No description
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| astro.config.mjs | ||
| index.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Astro Resume
Utilities for serializing data from server for use in the client.
ResumableAstro component takesidanddataresume(id: string): Objectfunction for use int he client takes anidstring and returns thedataas Object
Intallation
npm i @ayco/astro-resume
Usage
---
import Resumable from '../Resumable.astro';
const data = {
hello: 'world'
}
---
<Resumable id="astro-obj" data={data} />
<div id="render-here"></div>
<script>
import resume from '../resume';
console.log(resume('astro-obj'));
const renderDiv = document.querySelector('#render-here');
if (renderDiv) {
renderDiv.innerHTML = JSON.stringify(resume('astro-obj'))
}
</script>