-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
State is deprecated, but still used in Docs #2024
Comments
Would you like to open a PR to fix it? |
Hi @dai-shi , I will be happy to open pr of this issue but really I didn't understanding the bug |
I thinking @dinogomez got this error because it didn't create this next type in the image ![]() |
I'm not sure either but there remains deprecated State type from zustand in docs, right? |
Right @dai-shi , he remains the docs, but I checked this issue and I worked according to the docs and I didn't get this as an error My test: ![]() ![]() |
It looks good. |
Hi @dai-shi and @OshriAsulin , I am just starting to learn Zustand and Typescript, so I wont be able to help much. I just noticed the deprecation warning when I was following the docs in vscode. After following Oshi's reproduction I found that it was because I used a different name for state i.e After I renamed it properly it worked without warnings. So the docs were fine, it was just a mistake on my end. Sorry for taking moments of your time and thank you for the help as well. Since everything is good ill be closing the issue. Working with zustand is such a good dev experience and really helped me with my state management issues. Cheers! |
Okay, so there are no deprecated |
I will happy to work on this issue @dai-shi let me to know if I can to do that. |
|
I mean for improving, because the |
Do you mean adding |
Yes, It's resolved the issue. @dai-shi But it does not exist in the docs Untitled.video.-.Made.with.Clipchamp.2.mp4 |
So I thought about two options- import { create } from 'zustand'
import { shallow } from 'zustand/shallow' 2 Remove the @dai-shi let me to know which solution you want I implement? |
Add import statements, because removing |
Summary
State is deprecated but is still shown and used in the docs.
![image](https://private-user-images.githubusercontent.com/41871666/265220735-a081c677-6fca-4be1-bd11-c1f3a3696d91.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NjIwMjQsIm5iZiI6MTczOTc2MTcyNCwicGF0aCI6Ii80MTg3MTY2Ni8yNjUyMjA3MzUtYTA4MWM2NzctNmZjYS00YmUxLWJkMTEtYzFmM2EzNjk2ZDkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDAzMDg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlZTI3ZDM4ODNlZmRiNmE2YWFlZDlmNDFmMTM1NjIyMTA2Njg3NWM3MDgxMmYzOTFjZDAzZGU3YzdkNWI3MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.3EOe5d41CizkHLsEj3f-GpjKOoQ2ee5cHV4DnWBzzYE)
Docs
Link to reproduction
https://docs.pmnd.rs/zustand/guides/updating-state
https://github.com/pmndrs/zustand/blob/main/docs/guides/updating-state.md
The text was updated successfully, but these errors were encountered: