Skip to content

Widen @json-render/react peer range to react ^18.0.0 || ^19.0.0 #329

Description

@taysoh

The @json-render/react package declares "react": "^19.2.3" as a peer dependency (every published version back to 0.1.0 requires ^19). Auditing the 0.20.0 dist bundle, it only uses hooks that exist and are stable in React 18: useState, useEffect, useContext, useRef, useMemo, useCallback, and useSyncExternalStore — no use(), useActionState, or useOptimistic.

We're running it in production-shaped code on React 18.3.1 via an npm overrides entry, with the full render path (defineCatalog → defineRegistry → JSONUIProvider → Renderer, including useStateBinding two-way bindings, visibility conditions, and action dispatch) covered by our test suite — all green on React 18 + jsdom.

Would you consider widening the peer range to "react": "^18.0.0 || ^19.0.0" (and equivalently for react-dom if applicable)? That would let React 18 consumers adopt the library without silencing npm's peer check. Happy to open a PR if the range change is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions