Allows you to render a forgo component into a string.
npm i forgo-ssr
This is quite simple really.
import render from "forgo-ssr";
// A forgo component.
function MyComponent() {
return {
render() {
return <div>Hello world</div>;
},
};
}
// Get the html (string) and serve it via koa, express etc.
const html = render(<MyComponent />);