keepalive-for-react-router
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

KeepAlive for React Router

Installation

npm install keepalive-for-react keepalive-for-react-router

v6+

npm install react-router-dom keepalive-for-react keepalive-for-react-router@1.x.x

v7+

npm install react-router keepalive-for-react keepalive-for-react-router@2.x.x

Usage

// v6+ keepalive-for-react-router@1.x.x
// v7+ keepalive-for-react-router@2.x.x
import KeepAliveRouteOutlet from "keepalive-for-react-router";

function Layout() {
    return (
        <div className="layout">
            <KeepAliveRouteOutlet />
        </div>
    );
}

Package Sidebar

Install

npm i keepalive-for-react-router

Weekly Downloads

206

Version

2.0.2

License

MIT

Unpacked Size

9.55 kB

Total Files

8

Last publish

Collaborators

  • wongyichen