Hi team, thanks for building @openuidev/react-lang.
We would like to use @openuidev/react-lang in some existing business applications that are still running React 17. However, version 0.2.6 currently declares:
and the runtime imports React 18-only APIs such as:
useSyncExternalStore
useInsertionEffect
These APIs are not available in React 17, so the package cannot be safely used in React 17 applications.
Would you consider adding React 17 compatibility, possibly by using compatibility shims/fallbacks?
Potential approach:
// useSyncExternalStore
import { useSyncExternalStore } from "use-sync-external-store/shim";
// useInsertionEffect fallback
const useSafeInsertionEffect =
React.useInsertionEffect ?? React.useLayoutEffect ?? React.useEffect;
If compatibility is added, the peer dependency could potentially be relaxed to something like:
"react": "^17.0.2 || ^18.3.1 || ^19.0.0"
Use case: many enterprise/business systems are still on React 17, and supporting it would make @openuidev/react-lang easier to adopt without requiring a full React upgrade first.
Thanks!
Hi team, thanks for building @openuidev/react-lang.
We would like to use @openuidev/react-lang in some existing business applications that are still running React 17. However, version 0.2.6 currently declares:
and the runtime imports React 18-only APIs such as:
These APIs are not available in React 17, so the package cannot be safely used in React 17 applications.
Would you consider adding React 17 compatibility, possibly by using compatibility shims/fallbacks?
Potential approach:
If compatibility is added, the peer dependency could potentially be relaxed to something like:
Use case: many enterprise/business systems are still on React 17, and supporting it would make @openuidev/react-lang easier to adopt without requiring a full React upgrade first.
Thanks!