8000 Any thoughts on hydrating data with SSR? · Issue #266 · kbrsh/moon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Any thoughts on hydrating data with SSR? #266
Open
@ray-delossantos

Description

@ray-delossantos

Hi:

Any thoughts on hydrating data when creating an SSR rendering. I'll love to have an express server generating on server side the complete view (Maybe i'll use puppeteer - https://github.com/puppeteer/puppeteer). Where should i hydrate the data? from my simple understading i believe something like this could work:

Moon.use({
    data: Moon.data.driver(window.ssr.moon.data || 1)
});

Moon.run(({ data }) => {
    console.log(data); // => 1
    return {};
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0