# gaearon/react-side-effect

Create components whose nested prop changes map to a global side effect

Repository: https://github.com/gaearon/react-side-effect
Canonical: https://ross.abutalabs.com/products/react-side-effect
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2023-03-04T04:00:16+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": 4219, "days_push": 1278, "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 1215, forks 74 (observed 2026-08-28T04:04:01.087084+00:00)

## What it is
A React library providing a higher-order component that maps nested prop changes across the component tree to a global side effect. It gathers props from all mounted instances, reduces them to state, and invokes a client-side handler, with server-side peek/rewind support.

## Use cases
- set document body style based on current screen
- fire flux actions declaratively from component props
- manage global side effects from nested components
- collect props across the whole react tree
- handle side effects differently on server and client

## When to choose
- you need a global side effect driven by props from multiple nested components
- you want innermost-nested props to win when merging state
- you need server-side access to reduced state via peek and rewind

## When to avoid
- you only need side effects from a single component, where componentDidUpdate suffices
- you use a modern state management or document head manager instead
- the project is unmaintained and you need active support for latest React versions

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, middleware
- domain: frontend, web-development
- platform: cross-platform
- tags: react, higher-order-component, side-effects, server-side-rendering, nodejs, web-server

## Member repositories
- gaearon/react-side-effect (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:01.087084+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-30T06:17:16.295342+00:00, confidence not recorded.
  - readme: https://github.com/gaearon/react-side-effect (fetched 2026-08-28T04:04:01.087084+00:00, sha 892d2e1872b3)
  - registry_npm: https://registry.npmjs.org/react-side-effect (fetched 2026-08-29T12:25:17.395980+00:00, sha d61c3b95895e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
