Thanks for the information. I wanted to know why we are using useEffect to update the value of unnecessary re-rendring our component again instead we can set value in localStorage on button click Little bit of performance optimisation
Sir, I have a job, but I face a lot of stress. People often point out mistakes in my work repeatedly, and I constantly fear losing my job. This causes me a lot of tension, and I can't focus well. How can I control all of this
@@cosdensolutions Thanks for that. Project I took over recently has "any" everywhere, even though the original devs added TS to the package file. Wasn't aware of "unknown" or it's use case, but this makes perfect sense. :)
First, instead of using type unknown you can use a generic type for setting item in the local storage. I’ve done it countless times and it works well
Nice explanation
The best as always ❤
I really enjoyed your video. It was excellent! I really appreciate it!
Excellent material as always compa
Thank you very much. I needed this.
I have never had function like that inside useState so something new for me here
Thanks for the information. I wanted to know why we are using useEffect to update the value of unnecessary re-rendring our component again instead we can set value in localStorage on button click
Little bit of performance optimisation
When he dropped a 19 min video just for localStorage, I realised that there are far more things about localStorage that I have no idea about lmao
My hero 🎉
Show viewers how dope your tutorials are, then at the end advertise your course. Thank me later.
Would useSyncExternalStore be a more reliable approach here?
Please explain, persisting data in Zustland with initial value
Any reason to not put setItem inside useEffect cleanup function?
is there any chance you apply some percentage off for few hours or days on project react
Sir, I have a job, but I face a lot of stress. People often point out mistakes in my work repeatedly, and I constantly fear losing my job. This causes me a lot of tension, and I can't focus well. How can I control all of this
❤
cover indexeddb too.
can you please share upcoming chapters and modules.
🤩🤩🤩🤩
You're assuming the caller wants to log and ignore errors
Hi! Is it another way to achieve the useLocaleStorage your teaches us a year ago ? Or is it something really different ?
yeah exactly, different way of the same thing!
@5:40 why did you use type unknown rather than type any for the initialValue parameter?
type any usually isn't recommended and can throw linting errors in many projects, unknown is a more specific type that fits here better
@@cosdensolutions Thanks for that. Project I took over recently has "any" everywhere, even though the original devs added TS to the package file. Wasn't aware of "unknown" or it's use case, but this makes perfect sense. :)
You’re very beautiful; what’s is secret What is the secret to beauty 😀
❤