-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
makeStyles always requires props #16867
Comments
Guessing you have |
We're not using {
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "preserve",
"isolatedModules": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
} |
You are because |
As @merceyz pointed out we're not supporting Calling it with |
I still seem to be having this issue using a fresh cra install. |
@MarkMurphy Please open a new issue and fill out the issue template. |
@MarkMurphy did you open a new issue? same issue here with fresh CRA and |
Also experiencing the same issue. What's weird is only one component is showing the error. The others don't. I'm so confused |
@Phebonacci I had the same problem, all components worked, only one had the above error. I found this Answer, which said, that the |
Thanks @knoefel you save my day... |
@knoefel that solved, tks |
makeStyles
which does not use props should not require propsCurrent Behavior 😯
Expected 1 arguments, but got 0. An argument for 'props' was not provided
for theuseStyles
class.Expected Behavior 🤔
makeStyles
which does not use props should not require propsSteps to Reproduce 🕹
https://codesandbox.io/s/create-react-app-with-typescript-6wuym?fontsize=14
See above code.
Oddly enough, the codesandbox does not show the error
Context 🔦
Trying to use
makeStyles
with no props. I current have to pass{}
to bypass this issue.Your Environment 🌎
The text was updated successfully, but these errors were encountered: