Packages

package util

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract class CacheAndReplaceBoilerplate extends AnyRef
  2. final case class WindowLocation(href: String, origin: String, protocol: String, hostname: String, port: String, pathname: String, search: String, hash: String) extends Product with Serializable

    This corresponds to window.location in JavaScript.

Value Members

  1. object CacheAndReplace extends CacheAndReplaceBoilerplate

    Takes a potentially slow String* => String function and makes it super fast by executing it once, optimising and caching the result, and then using it as template for all subsequent calls.

    Takes a potentially slow String* => String function and makes it super fast by executing it once, optimising and caching the result, and then using it as template for all subsequent calls.

    This assumes provided functions are pure (e.g. embedding the current time would be a violation).

    This assumes provided functions treat their inputs as opaque values (e.g. inspecting an argument representing a username to provide "john" a different result than "mary" is a violation.)

    Note: If you call compileN with a function that returns an japgolly.scalagraal.Expr and see an error about an implicit Functor not found, add this import:

    import cats.instances.either._
  2. object ReactSsr

    Instructions for basic React SSR on the GraalVM:

    Instructions for basic React SSR on the GraalVM:

    1. Bundle React JS into your application yourself. 2. Use Expr.requireFileOnClasspath() to load React JS files. 3. Provide the above Exprs to ReactSsr.Setup.apply(). 4. Run the resulting Expr of above to initialise your ContextF instance(s). 5. Optionally call ReactSsr.setUrl() if your component expects to read it (eg. has a router). 6. Call ReactSsr.renderToString() or ReactSsr.renderToStaticMarkup() to render a component.

    See ScalaGraal's tests for concrete usage examples.

  3. object WindowLocation extends Serializable

Ungrouped