-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
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
[docs] makeStyles demo is broken #13680
Comments
This comment has been minimized.
This comment has been minimized.
@oliviertassinari https://codesandbox.io/s/0mpw102k00 I meant this demo. The docs demo works fine but the edit in codesandbox doesn't work |
@joshwooding Oh right, people can't just click on the edit button, they also have to change the react version: {
"title": "Material demo",
"description": "https://github.com/mui-org/material-ui/blob/master/docs/src/pages/css-in-js/basics/Hook.js",
"dependencies": {
- "react-dom": "latest",
- "react": "latest",
+ "react-dom": "next",
+ "react": "next",
"@material-ui/styles": "latest",
"@material-ui/core": "latest"
}
} |
We can add an option for it, like this: -{{"demo": "pages/css-in-js/basics/StyledComponents.js"}}
+{{"demo": "pages/css-in-js/basics/StyledComponents.js", "react": "next"}} |
@joshwooding What do you think? Do you want to handle it? :) |
@oliviertassinari I can have a go :) |
@joshwooding - the Demo is still not working "_react.default.useContext is not a function" |
@mkaschke The makeStyles demo works for me https://codesandbox.io/s/ywj9v6lz9v |
@mkaschke |
@joshwooding - your link works fine but the link on https://material-ui.com/demos/app-bar/ (under App Bar with menu) -> https://codesandbox.io/s/5kro05m06l is not working |
@oliviertassinari - thank you for your answer, I already fixed it for my project. |
Expected Behavior 🤔
makeStyles()
codesandbox demo should workCurrent Behavior 😯
It currently errors with: _react.default.useContext is not a function
Steps to Reproduce 🕹
Link: https://codesandbox.io/s/0mpw102k00
Your Environment 🌎
Demo needs to be updated to use react 16.7.0 alpha
The text was updated successfully, but these errors were encountered: