runApp()
Runs your Jaspr site on either the server or the client.
To run your site, use the runApp
function and provide your root component.
runApp(MyComponent());
This function works both on the client and on the server when you use static or server mode.
-
On the server this starts a http server that renders the given component to html for every incoming request.
-
On the client this attaches the given component to the DOM and thereby making your app interactive.
When you use static or server mode with automatic hydration, you don't call this function manually for the client-side part of your site and instead only use it on the server.