Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wolfsilver/keep-alive
React Keep Alive Component
https://github.com/wolfsilver/keep-alive
keep-alive react router
Last synced: about 2 months ago
JSON representation
React Keep Alive Component
- Host: GitHub
- URL: https://github.com/wolfsilver/keep-alive
- Owner: wolfsilver
- License: mit
- Created: 2024-02-05T07:23:35.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-05T08:12:32.000Z (12 months ago)
- Last Synced: 2024-10-14T20:53:35.274Z (3 months ago)
- Topics: keep-alive, react, router
- Language: TypeScript
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Keep Alive Component
The React Keep Alive component is a utility component that helps in preserving the state of mounted components even when they are unmounted from the DOM. It can be useful in scenarios where you want to maintain the state of a component across different routes or when you want to improve performance by avoiding re-rendering of components.
## Installation
You can install the React Keep Alive component using npm or yarn:
```bash
npm install react-router-keepalive
```## Usage
`Layout` is a component that uses the `KeepAlive` component to preserve the state of the component when the route changes.
`KeepAlive` is a utility component that preserves the state of the component when it is unmounted from the DOM.