-
-
Notifications
You must be signed in to change notification settings - Fork 243
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 for Downgrading react-redux
Dependency in react-querybuilder
7.x to Support React 16.x Compatibility
#676
Comments
react-querybuilder
7.x does not support react 16.x,can you guys downgrade the react-redux
version to 8.x?react-redux
Dependency in react-querybuilder
7.x to Support React 16.x Compatibility
I'm not inclined to downgrade that dependency in RQB for a couple of reasons, one being selfish: the TypeScript types in v7 were really hard to get right and I don't want to revisit them. The Can I ask why you're still using React 16? Usually it's organizational bureaucracy and not a technical limitation, but since RQB is generally used for enterprise applications I like to know what sort of friction you're dealing with. If I was to attempt downgrading the dependency, it would mean moving If I'm wrong about any of those assumptions, I'm happy to reevaluate. I'm by no means an expert at this stuff (despite having maintained an open source package for several years!). |
Thanks for your reply. Indeed, as you mentioned, the reason I am still using React 16 is that I am maintaining an enterprise-level application developed using some low-code platforms (you can think of it as similar to Salesforce's development platform), which currently only supports React 16. When I used the latest version of RQB, it strongly depended on the React.useSyncExternalStore API because of react-redux v9, and this API is only available from React 18. Although there is a shim version for compatibility, v9 does not use it. Also I spent over half of the day to resolve the ESM building problems of RTK v2 before I found the I can guess that RQB v7 might use react-redux for unified data state management, but I believe that React's own Context API or hooks could also solve this problem without the need to introduce react-redux, which seems a bit too heavy compared to React's own APIs. I fully understand your reasons for not wanting to downgrade, and indeed React 16 is somewhat outdated at this point. Currently, I can choose RQB v6 as an alternative, which works well with React 16. By the way, as a reminder, the |
Yeah, I figured as much.
So sorry about that!
That's a good point. Thanks for the reminder! I need to update the changelog and v7 migration guide as well.
I did go through some iterations of v7 pre-release that used React's context API and even For my money, React context and All that said, if it wasn't for the TypeScript issues I might actually consider downgrading the dependency. Do you think there may be a way to force |
One reason for performance and another for convenience. Sounds pretty reasonable.
Forcing react-redux v9 to use the shim is challenging without modifying the source code, and such modifications are not in line with the intentions of the react-redux team. As they mentioned:
Maybe we can add some code at the entry file of RQB like this:
Do not forget I wonder if you would have a try. Appreciate for that. |
React Query Builder version
7.x
Platform
No response
Description
The
react-querybuilder
7.x version depends onreact-redux
^9.1.0, which in turn requires React version 18.0 or higher. I am not certain ifreact-redux
8.x would be compatible withreact-querybuilder
7.x, so I'm wondering if it's possible to downgradereact-redux
to the 8.x version.Reproduction
react-redux
package.jsonExpected behavior
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: