romac/react-if
🌗 Render React components conditionally observed · 2026-08-28
Health v2 · maintenance only
10/100
- Activity 75
- Release rhythm 8
- Longevity 100
Flags: archived
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4382
- days_rel: 463
- days_push: 152
- n_releases_24m: 1
Adoption not part of the score
1142 stars · 58 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small React component library providing declarative conditional rendering via If/Then/Else JSX components. It makes ternary-based conditional rendering more readable and supports lazy evaluation of children via arrow functions.
Use cases
- conditionally render react components
- replace ternaries in jsx with readable if/else components
- lazy-evaluate expensive jsx children only when condition is true
- write declarative conditional logic in react templates
When to choose
- you want more readable conditional rendering than nested ternaries in JSX
- you need deferred evaluation of expensive children or conditions
- you prefer a tiny, dependency-free declarative helper
When to avoid
- you are fine with plain ternaries or && in JSX
- you want full control over rendering logic without extra components
- your team avoids non-standard JSX abstractions
Facets
library · maturity stable
ui-components frontend-framework frontend web-development browser cross-platform react conditional-rendering jsx-components typescript nodejs
2 sources
- readme: https://github.com/romac/react-if · fetched 2026-08-28 · a632d5f8a577
- registry_npm: https://registry.npmjs.org/react-if · fetched 2026-08-29 · 0644df99d72b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| romac/react-if | main | 10 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem