Material UI v5: TypeError: Cannot read properties of undefined (reading ‘create’)

Just ran into this myself. You can import createTheme from @mui/material/styles or @mui/system, but they do slightly different things: You can use the utility coming from the @mui/system package, or if you are using @mui/material, you can import it from @mui/material/styles. The difference is in the default theme that is used (if no theme is … Read more

In React Router v6, how to check form is dirty before leaving page/route

Update: Prompt, usePrompt and useBlocker have been removed from react-router-dom. This answer will not currently work, though this might change. The github issue, opened Oct 2021, is here The answer… This answer uses router v6. You can use usePrompt. usePrompt will show the confirm modal/popup when you go to another route i.e. on mount. A … Read more

Difference between @mui/material/styles and @mui/styles?

Normally in v4, you’d import the style API from @material-ui/core/styles. This one uses JSS behind the scene: import { makeStyles } from ‘@material-ui/core/styles’; In v5, they changed the brand name to MUI. As a result, the package name changed too: import { makeStyles } from ‘@mui/material/styles’; But MUI v5 also drops the support for JSS … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)