i have been given the task to upgrade my package.json file and make changes in accordance to that to my working react application....when i changed ....i had issues material-ui...and specially with withStyles and makeStyles....and had to install @mui/styles to make them work...as i couldnt work with styled....as my code is class based its throwing errors...but after all those changes...im getting useContext expection....i havent used that hook in my application i am not getting why...also when i changed Switch to Routes for react-router-dom...and removed useHistory and used Navigate...i did not get any errors but my application wasnt loading so i tried to use the previous version of react-router-dom....and im getting useContext error..
react.development.js:1618 Uncaught TypeError: Cannot read property 'useContext' of null
at Object.useContext (react.development.js:1618)
at useTheme (useTheme.js:4)
at useTheme (index.js:4)
at useStyles (makeStyles.js:188)
at Module../src/layouts/Dashboard.jsx (Dashboard.jsx:293)
at Module.options.factory (react refresh:6)
at __webpack_require__ (bootstrap:24)
at fn (hot module replacement:62)
at Module../src/routes/index.jsx (dashboard.jsx:544)
at Module.options.factory (react refresh:6)
./src/routes/index.jsx @ dashboard.jsx:544
export default makeStyles(appStyle)(Dashboard); this is the line
the dashboard page line has exporting the component i used with wrapping styles using makeStyles like
where Dashboard is my component and appStyles are my css styles i have written and imported and tried to use for my Dashboard component why.....im relatively new...so im kind of stuck any help would be appreciated