3 ms·
React has always opted for better performance even if that causes the API to be harder to use. This can be seen in how setState() behaves differently depending
by city41 8y ago
React has always opted for better performance even if that causes the API to be harder to use. This can be seen in how setState() behaves differently depending on when you call it, keys, and now getDerivedStateFromProps. I've been using React since its inception and just the other day I got stuck with a gotcha on keys I was not expecting. Not saying this is good or bad, it's just the approach React took.