Skip to content

forgojs/forgo-ssr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forgo Server Side Rendering

Allows you to render a forgo component into a string.

Installation

npm i forgo-ssr

Rendering to a string

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 />);

About

Server-side Rendering for Forgo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published