We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to run the demo code for the AppBar and I'm having the following error:
TypeError: Cannot read property 'root' of undefined at AppBar (http://localhost:3000/main.6134e384acec73e762d9.hot-update.js:536:50) at renderWithHooks (http://localhost:3000/main.js:19537:22) at updateForwardRef (http://localhost:3000/main.js:21101:24) at beginWork (http://localhost:3000/main.js:22377:20) at performUnitOfWork (http://localhost:3000/main.js:26372:16) at workLoop (http://localhost:3000/main.js:26413:28) at renderRoot (http://localhost:3000/main.js:26493:11) at performWorkOnRoot (http://localhost:3000/main.js:27450:11) at performWork (http://localhost:3000/main.js:27360:11) at performSyncWork (http://localhost:3000/main.js:27334:7)
AppBar Code
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import IconButton from '@material-ui/core/IconButton'; import MenuIcon from '@material-ui/icons/Menu'; const useStyles = makeStyles(theme => ({ root: { flexGrow: 1, }, menuButton: { marginRight: theme.spacing(2), }, title: { flexGrow: 1, }, })); export default function ButtonAppBar() { const classes = useStyles(); return ( <div className={classes.root}> <AppBar position="static"> <Toolbar> <IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="Menu"> <MenuIcon /> </IconButton> <Typography variant="h6" className={classes.title}> News </Typography> <Button color="inherit">Login</Button> </Toolbar> </AppBar> </div> ); }
The text was updated successfully, but these errors were encountered:
Please can you provide a minimal reproducible example? A codesandbox or a stand-alone got repository will do.
Sorry, something went wrong.
Hey, same problem. Here's the sandbox: https://codesandbox.io/s/trusting-feather-wzo2l?file=/src/components/Layout/Navbar.jsx
@sps-software Weird the problem disappears when you remove antd from the package.json
@sps-software the problem disappears if you use 4.1.3 of antd.
No branches or pull requests
I'm trying to run the demo code for the AppBar and I'm having the following error:
AppBar Code
Your Environment 🌎
The text was updated successfully, but these errors were encountered: