-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to Address Compatibility Issues with React #741
Comments
Hey @shujieali, I've assigned this issue to @toddbaert. He was working on adding support for the React suspense API which relies on some changes added in React 18 I believe. However, I understand that people may not but using that version of React yet. Perhaps there's a way to add support for suspense without making it incompatible with React 16.8. |
@beeme1mr Thank you ! React suspense is indeed an amazing addition, but we should be careful in defining minimum requirements for a package. i'll have a look on the suspense implementation and see what can be done ! |
That would be great! |
@shujieali relevant comment: #742 (comment). It might be that the suspense features we have work fine with |
…> 16.8.0 (#742) ## This PR fix the npm warning when installing @openfeature/react-sdk in application using react version < 18 | Package | Change | Passing | Confidence | |-----------|----------|-----------|--------------| | [react](https://github.com/facebook/react) | [18.0.0](https://github.com/facebook/react/releases/tag/v18.0.0) -> [16.8.0](https://github.com/facebook/react/releases/tag/v16.8.0) | True | High | Fixes #741 ### How to test 1. create a react project using react 16.8.0, node 14, npm 6.X.X 2. install @openfeature/react-sdk 3. Observe no install warning 4. use `useFeatureFlag` in application as per documentation with no issue. Signed-off-by: Shujaat Ali <dr.shujaat_ali@hotmail.com> Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Observed behavior
The current version of the react-sdk relies on a React version >=18.0.0. However, there are compatibility concerns for applications that might be using older versions of React, potentially causing dependency warnings or errors. Since hooks were introduced in react 16.8.0 so we should be putting the minimum version to 16.8.0
Expected Behavior
The package should maintain compatibility with applications using older versions of React while also supporting the latest versions without compromising functionality.
Steps to reproduce
Observe the following warning:
The text was updated successfully, but these errors were encountered: