using useOptimistic in next14 error
Unanswered
Asian black bear posted this in #help-forum
Asian black bearOP
I just upgraded my app from 13.5 to 14 , I was using the experimental_useOptimistic without any problems but when I upgraded I started seeing this error which says : "experimental_useOptimistic only works in Client Components. Add the "use client" directive at the top of the file to use it" , the thing is iam using it in a client component not in server component ofc
1 Reply
upgrade your @types/react to the latest version and just useOptimistic instead of the experimental one