How does React StrictMode affect component unmounting?
React StrictMode deliberately double-invokes certain functions, including component unmounting callbacks (componentWillUnmount and useEffect cleanup functions), to help detect unexpected side effects. This means in development mode with StrictMode enabled, your cleanup functions might run more times than expected, which helps identify issues like improper cleanup that might only appear in certain conditions.