I’m working on a small project using material-talwind, but I’m getting the error TypeError: Cannot read properties of null (reading ‘useContext’) and I still can’t fix it.
Error img
It seems like it reports an error in material-tailwind’s theme.js
Error
ThemeProvider
root.render(
<React.StrictMode>
<ThemeProvider>
<Provider store={store}>
<Suspense fallback={<div>Loading...</div>}>
<RouterProvider router={router}/>
</Suspense>
</Provider>
</ThemeProvider>
</React.StrictMode>
);
Version
“react”: “^18.3.1”
“@material-tailwind/react”: “^2.1.9”
“@types/react”: “^18.2.42”
How can I fix it, I try to use some other version of material tailwind but not working