LiveReact.SSR.ViteJS (live_react v1.0.0)

View Source

Implements SSR by making a POST request to http://{:vite_host}/ssr_render.

ssr_render is implemented as a Vite plugin. You have to add it to the vite.config.js plugins section.

import liveReactPlugin from "live_react/vite-plugin";

{
  publicDir: "static",
  plugins: [react(), liveReactPlugin()],
  // ...
}

Summary

Functions

Callback implementation for LiveReact.SSR.render/3.

A handy utility returning path relative to Vite JS host.

Functions

render(name, props, slots)

Callback implementation for LiveReact.SSR.render/3.

vite_path(path)

A handy utility returning path relative to Vite JS host.