prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

React 18 Support #1195

Open Saturate opened 1 year ago

Saturate commented 1 year ago

Do you want to request a feature or report a bug?

React 18 support would be nice, so that project dependencies can be bumped.

What is the current behavior?

Currently if we force it to use React 18 not all useFirestoreConnect listerns is kept - some of them unlisten right after they are registered. It's only some of them, I find that a bit strange - but there could be a reason for it? They are all registered in the same useFirestoreConnect.

What is the expected behavior?

Should work as before. And currently I'm pretty much in the dark on why that would not be the case.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

Same setup works fine with React 17.

maderesponsively commented 1 year ago

After trying for hours to fix 'useFirestoreConnect,' I decided to check the repo. It looks like I am not the only one experiencing this problem. I guess that's one step closer to fixing the issue ...

capi1O commented 1 year ago

We encountered the same issue with react 18 (18.2). Downgrading to react 17 fixed it!

@Saturate Thanks for pointing us in the right direction. We initially installed RRF using on older version of node/npm which did not complain about peerDependencies incompatibilities. I looked at this issue while trying to find a way to make RRF work with react 18, until I realize that could actually be the cause of the problem we had with useFirestoreConnect.

MikeLundahl commented 1 year ago

Is there any plans to when support React 18? I can see activity when it comes to PR's, but a year has passed since last publish according to NPM? I upgraded a couple of projects to React 18.

JesusChrisse commented 1 year ago

It's really sad to be forced to use React 17. There's multiple functionnality that I'm eager to use in my project that are only advailable in React 18.

mattirizarry commented 1 year ago

I am currently experiencing this. Would like to use the new features of React 18, but am unable to.

snooter commented 1 year ago

Really need this on React 18 :-(

devShamim commented 1 year ago

Use this until there is an official release npm install git+https://github.com/devShamim/react-redux-firebase.git Or npm install react-18-redux-firebase

uloco commented 9 months ago

~Is there any way to override only the react-redux-firebase package to use react 17 and the rest of the app continue to use react 18? we are forced to update to the latest react-native version because of the recent android store limitations that only allow recent sdk versions. I tried using the "overrides" property in package.json but I don't think it works that way...~

EDIT: This will not work because react hooks disallow us to have multiple react versions. (and was a bad idea in general anyway)

iamibrahimriaz commented 8 months ago

https://github.com/devShamim/react-redux-firebase

Thanks a Lot @devShamim

Nagarjun-Trimble commented 5 months ago

it's been more than 2 years, Is there any update on support React v18"It has been over two years. Is there any update regarding the support for React v18?"