Skip to main content
On this pageFunctions

Navigation

back

functionsource
/** Navigates back in browser history. */
(): Effect<void>

forward

functionsource
/** Navigates forward in browser history. */
(): Effect<void>

load

functionsource
/** Performs a full page navigation to the given href. */
(href: string): Effect<void>

openUrl

functionsource
/**
 * Opens the given href in a new browsing context (tab or window, at the browser's discretion).
 *  The current page is unchanged. Subject to popup blockers when not called from a user-gesture handler.
 */
(href: string): Effect<void>

pushUrl

functionsource
/** Pushes a new URL to browser history and triggers Foldkit's URL change handling. */
(url: string): Effect<void>

replaceUrl

functionsource
/** Replaces the current URL in browser history and triggers Foldkit's URL change handling. */
(url: string): Effect<void>

External

constsource
/** A URL request to an external page (different origin). */
const External: CallableTaggedStruct<"External", {
  href: String
}>

Internal

constsource
/** A URL request to a page within the application (same origin). */
const Internal: CallableTaggedStruct<"Internal", {
  url: Struct<{
    hash: Option<String>
    host: String
    pathname: String
    port: Option<String>
    protocol: String
    search: Option<String>
  }>
}>

UrlRequest

constsource
/** Union of `Internal` and `External` URL request types. */
const UrlRequest: Union<readonly [
  CallableTaggedStruct<"Internal", {
    url: Struct<{
      hash: Option<String>
      host: String
      pathname: String
      port: Option<String>
      protocol: String
      search: Option<String>
    }>
  }>,
  CallableTaggedStruct<"External", {
    href: String
  }>
]>

Stay in the update loop.

New releases, patterns, and the occasional deep dive.


Built with Foldkit.

© 2026 Devin Jameson