# StructureBuilder/react-keep-alive

A component that maintains component state and avoids repeated re-rendering.

Repository: https://github.com/StructureBuilder/react-keep-alive
Canonical: https://ross.abutalabs.com/products/react-keep-alive
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2023-01-03T17:13:58+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2740, "days_push": 1338, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1005, forks 108 (observed 2026-09-03T02:15:08.251431+00:00)

## What it is
A React library providing a KeepAlive component that preserves component state across unmounts, similar to Vue's keep-alive. It wraps components with a Provider to cache them and avoid repeated re-rendering, independent of React Router.

## Use cases
- preserve component state when switching tabs in a React app
- avoid re-rendering expensive components on navigation
- implement Vue-style keep-alive caching in React
- cache form state when users navigate away and back
- keep list scroll position and filters alive across route changes

## When to choose
- you need Vue-like keep-alive behavior in React
- you want caching that works without React Router
- you need CSS animations on cached components since it doesn't use display:none

## When to avoid
- you're on React 18+ with modern alternatives available
- your components are cheap to re-render and caching adds complexity
- you need actively maintained support for the latest React versions

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, ui-components, caching
- domain: frontend, web-development
- platform: browser
- tags: react, keep-alive, component-caching, performance-optimization, typescript, nodejs

## Member repositories
- StructureBuilder/react-keep-alive (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:08.251431+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:08.325219+00:00, confidence not recorded.
  - readme: https://github.com/StructureBuilder/react-keep-alive (fetched 2026-09-03T02:15:08.251431+00:00, sha 72030fa60a86)
  - registry_npm: https://registry.npmjs.org/react-keep-alive (fetched 2026-08-29T13:13:10.988014+00:00, sha 10c77a3ca841)
- Data as of 2026-08-30T08:39:29.467469+00:00.
