1.0.0 • Published 4 years ago
@vuoro/astro-renderer-rahti v1.0.0
Astro renderer for Rahti: https://github.com/vuoro/rahti
npm install @vuoro/astro-renderer-rahti @vuoro/rahti- Add the renderer to your Astro project configuration. At the time of writing you need to add a file named
astro.config.mjsto the root of your project, with the contents:export default { renderers: ['@vuoro/astro-renderer-rahti'] };. For details about configuring Astro, see https://docs.astro.build. - Now you should be able to mount any Effect in Astro as a Component.
<YourEffect someProp={"someValue"}>blah</YourEffect>should call your Effect like this:YourEffect(root, {someProp: "someValue"}, ["blah"]). - Your effect should use the provided
rootfor any DOM Effects, and also pass the providedchildrenarray to it:const YourEffect = effect((root, props, children) => { root(p("Hello world"), children) }).