Thanks for this awesome project! Really appreciate it! Looking forward to more videos like this! Next.js + TypeScript project would be really cool to see. Thank you for sharing your work!
Hey, i wouldnt recommend to use spread operator that way in the state... when your state depends on itself, you must use a function as setState argument and then spread the currentState with the new one in order to avoid a bug because state is async. E.g setState(currentState => [...currentState, {name: 'example'}]). Also, your logic must be always a pure function in a separate file.. so you can import it everywhere and even create a unit test for it, so that way your components can be very simple
Thanks for this awesome project! Really appreciate it! Looking forward to more videos like this! Next.js + TypeScript project would be really cool to see. Thank you for sharing your work!
Thanks sir ❤
Excelent! My only problem was the version of react charjs, but I learnt a lot! Thanks!
I don't get any data as it shows
I am building a project basis on this, but i have a rather complicated json file. Need help with that
Hey, i wouldnt recommend to use spread operator that way in the state... when your state depends on itself, you must use a function as setState argument and then spread the currentState with the new one in order to avoid a bug because state is async. E.g setState(currentState => [...currentState, {name: 'example'}]). Also, your logic must be always a pure function in a separate file.. so you can import it everywhere and even create a unit test for it, so that way your components can be very simple
You are right about setState. Thank you for your comment.
good