riot / ssr

Riot.js node Server Side Rendering
MIT License
32 stars 8 forks source link

How to render all related components ? #11

Closed rzfang closed 4 years ago

rzfang commented 4 years ago

I have tag1.riot to use tag2.riot, and call ssr.fragments() for tag1. It only handles tag1 and keep tag2 as a empty tag...

here is a sample to show my issue: https://codesandbox.io/s/xenodochial-leaf-8jflb

cybervaldez commented 4 years ago

Hi tag1 should export a components property with tag2 in it export default { components : { tag2 } }

here's how I do mine including getting all the css from the children components. https://codesandbox.io/s/kind-bhaskara-g5tqh?fontsize=14&hidenavigation=1&theme=dark

GianlucaGuarini commented 4 years ago

@cybervaldez thank you. That's right @rzfang forgot to import the Riot.js component into tag1

rzfang commented 4 years ago

Sorry, didn't catch this, is this in the document ? Thanks you both, @cybervaldez , @GianlucaGuarini