-
Notifications
You must be signed in to change notification settings - Fork 94
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
React 18 support #330
Comments
Hi I am experimenting the same issue. I even copied and pasted the code example from here:
and still does not work |
Seeing the same thing. It appears to only be a problem when the component is wrapped in |
I was able to replace The TypeScript types are cleaner and |
Another alternative (also useful for those battling with TypeScript support), there is https://www.npmjs.com/package/react-async-hook |
I'm still waiting for this feature... |
I am using the useAsync hook and deferred function was not running for the below reason "With Strict Mode starting in React 18, whenever a component mounts in development, React will simulate immediately unmounting and remounting the component." The code has a isMounted ref and this is set to false when useEffect cleans up. I have updated the code to reset to its' default value of true on mount |
No updates in almost 2 years. No React 18 support. I guess this library is dead. |
Looks like there's a proposed fix: #331 Anyone been able to compile and test this? |
I guess I am having the same problem. Using React 18, Promises will always remain in "pending" state, even after my custom fetch method finished, and never be solved. A fix would be appreciated. |
@mibadim Yeah I have the same issue, there is a PR waiting, you can also set strict mode to false, which is not ideal. Until that PR gets merged you kind of stuck |
Hi, I tried to upgrade to React 18 but this library doesn't seem to work.
As soon as I switched
ReactDOM.render(..., ...)
tocreateRoot(...).render(...)
all async states stopped working.More specifically, all states stay in
pending
state and the promises are inexplicably of typeNeverSettle
.Here you can find the React 18 upgrade guide
The text was updated successfully, but these errors were encountered: