Unexpected Application Error! Cannot read properties of undefined (reading 'status')
TypeError: Cannot read properties of undefined (reading 'status') at http://localhost:5173/src/components/Header/Header.jsx:27:56 at http://localhost:5173/node_modules/.vite/deps/react-redux.js?v=3e656e7e:1021:28 at memoizedSelector (http://localhost:5173/node_modules/.vite/deps/react-redux.js?v=3e656e7e:31:32) at http://localhost:5173/node_modules/.vite/deps/react-redux.js?v=3e656e7e:51:24 at mountSyncExternalStore (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=3e656e7e:4647:26) at Object.useSyncExternalStore (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=3e656e7e:16448:18) at exports.useSyncExternalStore (http://localhost:5173/node_modules/.vite/deps/chunk-S5FHZHKU.js?v=3e656e7e:1097:36) at exports.useSyncExternalStoreWithSelector (http://localhost:5173/node_modules/.vite/deps/react-redux.js?v=3e656e7e:60:21) at useSelector2 (http://localhost:5173/node_modules/.vite/deps/react-redux.js?v=3e656e7e:1076:85) at Header (http://localhost:5173/src/components/Header/Header.jsx:27:22) Hey developer
You can provide a way better UX than this when your app throws errors by providing your own ErrorBoundary or errorElement prop on your route.
Source: hiteshchoudhary/chai-aur-react