React Challenge - 4 ??
How are we expected to solve this?
I intuitively came up with the first approach when I first tried to solve this, but Cristian says to only use the state in the App component for this, which took me a lot more effort to figure out cuz in the first one, it's very easy to update the each counter individually without touching others and needing an id, but in the second one all the counters re-render everytime just one of them is clicked.
But which is better?
3
7 comments
Prudhvi Raj Maddukuri
5
React Challenge - 4 ??
powered by
Developer Pro
skool.com/developerpro-6146
Learn how to code. Make money. Have fun. Enjoy life.
Build your own community
Bring people together around your passion and get paid.
Powered by