-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Chapter 14 Improving Accessibility - useActionState is not available in React #775
Comments
I am not able to reproduce, can you share more about what you're seeing? Can you restart your TypeScript server? |
@dtknepper - Ran into something similar, @leerob 's suggestion to restart the Typescript server solved it on my end The following steps may be helpful
![]()
![]() |
I have updated all my dependancies, and I still get this error. I was however able to still continue with this project by using @braxtonb I see in you screenshot that you actually use the Canary release of React and not the general release. That's why you do not get this error. |
Indeed, you are supposed to be using the Those will soon be stable, but this is getting things ready ahead of time. |
Uppon importing useActionState like so:
import { useActionState } from 'react';
The following error appears:
Module '"react"' has no exported member 'useActionState'.ts(2305)
When searching on Google, the official React Documentation actually says that the
useActionState
is still an experimental feature in their Canary channel.I assume this means that when using the stable version of React, this Hook is not available yet and can therefore not be used.
If I am completely wrong on this topic, please explain me what I am doing wrong! I'm not doing this course because I am so good at this all already ;)
The text was updated successfully, but these errors were encountered: