-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cannot import useState because there is no useState export in react. #7489
Comments
This has already been in Flow for a few versions now. Which Flow version are you using? |
0.93.0 |
@ionutcirja How do you import it? |
Also do you have globally installed flow? |
Flow is installed locally as a dev dependency. Thanks |
This is weird. Could you make a screenshot with the error in terminal? |
Can you also run |
Hmm, I think it might be about flow-babel-webpack-plugin. |
It seems it is not. Now I'm running out of ideas. |
Did you recently upgrade Flow? It's possible that your old server was still running and so it didn't launch a 0.93.0 server |
Yes, upgraded few hours ago. Is there any way to 'clear' the old version. |
|
Still getting 'Cannot import useState because there is no useState export in react.' when I run webpack. |
@ionutcirja You probably have flow in transitive dependencies. I would get rid from this plugin. It doesn't have official support and since it's archived it doesn't have any support. |
Closing as not related to flow. |
Problem fixed. Many thanks for your help. |
how is it fixed? |
After searching everywhere Found the Solution Use Flow as mentioned by many developers above I tried installing flow and it works
Also If that not work try once this also |
I just update react to latest version (16.8.2) and flow is complaining about this.
'Cannot import useState because there is no useState export in react.'.
Any plans to update flow?
Thanks
The text was updated successfully, but these errors were encountered: