Why is using the index as a key in React lists a bad idea?
If the list order changes, it can lead to performance issues and bugs as React uses keys to reconcile the DOM.
How can you prevent a component from re-rendering?
Using React.memo() for functional components or shouldComponentUpdate lifecycle method for class components.
Name some tools you can use to diagnose performance issues in React apps.
React DevTools, Chrome DevTools, the Profiler API, and Lighthouse.