Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

@stackflow/plugin-history-sync

Package Overview
Dependencies
14
Maintainers
2
Versions
90
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

@stackflow/plugin-history-sync

Synchronizes the stack state with the current browser's history

    1.3.2
    npm

Version published
Maintainers
2
Weekly downloads
536
decreased by-34.39%

Weekly downloads

Readme

Source

@stackflow/plugin-history-sync

Synchronizes the stack state with the current browser's history

  • Documentation

Usage

import { stackflow } from "@stackflow/react"; import { historySyncPlugin } from "@stackflow/plugin-history-sync"; import { MyHome } from "./MyHome"; import { MyArticle } from "./MyArticle"; import { NotFoundPage } from "./NotFoundPage"; const { Stack, useFlow } = stackflow({ activities: { MyHome, MyArticle, NotFoundPage, }, plugins: [ // ... historySyncPlugin({ routes: { /** * You can link the registered activity with the URL template. */ MyHome: "/", MyArticle: "/articles/:articleId", NotFoundPage: "/404", }, /** * If a URL that does not correspond to the URL template is given, it moves to the `fallbackActivity`. */ fallbackActivity: ({ context }) => "NotFoundPage", /** * Uses the hash portion of the URL (i.e. window.location.hash) */ useHash: false, }), ], });

FAQs

Last updated on 20 Mar 2023

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc