Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

@stackflow/plugin-history-sync

Package Overview
Dependencies
2
Maintainers
2
Versions
79
Issues
File Explorer

Advanced tools

@stackflow/plugin-history-sync

Synchronizes the stack state with the current browser's history

    1.3.2latest
    npm

Version published
Maintainers
2
Weekly downloads
391
decreased by-48.42%

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 Socket
Socket
support@socket.devSocket 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