You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-history-modals

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-history-modals

A React hook and context for managing modals with browser history integration.

1.0.1
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-history-modals

A lightweight React hook and context for managing modal states by integrating with the browser's history API. This allows users to open, close, and navigate through modals using the browser's back and forward buttons, enhancing user experience in applications with complex modal flows.

Features

  • Browser History Integration: Modals are pushed into the browser's history, enabling seamless navigation with browser back/forward buttons.
  • Simple API: Easy-to-use HistoryModalProvider and useHistoryModals hook.
  • Multiple Modals: Supports managing multiple active modals simultaneously.
  • Type-Safe: Built with TypeScript for a robust development experience.
  • SSR Compatible: Includes a simple check to prevent history API usage during server-side rendering.
  • Optimized: Small bundle size due to Rollup's tree-shaking and minification, externalizing react and react-dom.

Installation

You can install react-history-modals using npm or yarn:

npm install react-history-modals
# or
yarn add react-history-modals

Keywords

react

FAQs

Package last updated on 09 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.