japgolly.scalagraal.js
package japgolly.scalagraal.js
Type members
Classlikes
object ReactSsr
Instructions for basic React SSR on the GraalVM:
Instructions for basic React SSR on the GraalVM:
- Bundle React JS into your application yourself.
- Use Expr.requireFileOnClasspath to load React JS files.
- Provide the above Exprs to ReactSsr.Setup.apply.
- Run the resulting Expr of above to initialise your AbstractGraalContext instance(s).
- Optionally call ReactSsr.setUrl if your component expects to read it (eg. has a router).
- Call ReactSsr.renderToString or ReactSsr.renderToStaticMarkup to render a component.
See ScalaGraal's tests for concrete usage examples.
final case class WindowLocation(href: String, origin: String, protocol: String, hostname: String, port: String, pathname: String, search: String, hash: String)
This corresponds to window.location
in JavaScript.
This corresponds to window.location
in JavaScript.
- Companion
- object