Great video, will probably actually use this for a project i'm working on currently. Btw your Source Code link in the description is broken currently. I was able to find it though from going through your code monorepo and going to the persist-state-localStorage-tutorial repo within it.
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
Works great! However, do you have any lib recommendations that we can use directly? I see many of them have these hooks, like react-use, ahook... I don't think in reality we need write our own.
@@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. :)
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
Do not fret, take their feedback onboard and learn from it. At some point you’d exhaust their ‘mistakes curriculum’ and you’d gain confidence and be better. We all learn on the Job
Nice example of custom hook for local storage.
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
It's very understandable. Thanks!😊
wow, great job!
Thanks!
Great video❤
Excellent material as always compa
I really enjoyed your video. It was excellent! I really appreciate it!
The best as always ❤
Nice explanation
Thank you very much. I needed this.
grate explanation
My hero 🎉
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
Great video, will probably actually use this for a project i'm working on currently. Btw your Source Code link in the description is broken currently. I was able to find it though from going through your code monorepo and going to the persist-state-localStorage-tutorial repo within it.
Would useSyncExternalStore be a more reliable approach here?
Show viewers how dope your tutorials are, then at the end advertise your course. Thank me later.
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
Woohoo
I have never had function like that inside useState so something new for me here
Please explain, persisting data in Zustland with initial value
❤
🤩🤩🤩🤩
Works great! However, do you have any lib recommendations that we can use directly? I see many of them have these hooks, like react-use, ahook... I don't think in reality we need write our own.
can you please share upcoming chapters and modules.
cover indexeddb too.
is there any chance you apply some percentage off for few hours or days on project react
Any reason to not put setItem inside useEffect cleanup function?
I don't understand what you're trying to say
@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 assuming the caller wants to log and ignore errors
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
Do not fret, take their feedback onboard and learn from it. At some point you’d exhaust their ‘mistakes curriculum’ and you’d gain confidence and be better. We all learn on the Job
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!
You’re very beautiful; what’s is secret What is the secret to beauty 😀
❤