Closed dimaMachina closed 1 month ago
this is unneeded as props are always object
Who defines that?
I think it’s not needed when used as <MDXContent />
. But some people don’t do that. Some people do MDXContent()
But some people don’t do that. Some people do
if they do it, they can do MDXContent({})
😅
Also React always passes an object as props. Other JSX frameworks might not.
People can indeed do MDXContent({})
. And that’s probably good.
But. Now people don’t have to. And indeed: what about other frameworks.
I personally don’t think it’s worth a breaking change. For what benefit?
And I worry about those frameworks.
And indeed: what about other frameworks.
preact definitely should follow React convention, I guess their behaviour should be similar, about other frameworks, idk
For what benefit?
why do specify something that is technically is never will be used, to save some bytes too 😂
Hi team! Could you describe why this has been marked as wontfix?
Thanks, — bb
I would agree with this if it was just a React component, but MDX can be used in various ways.
Feel free to create your own recma plugin if you really want to remove the default argument
Initial checklist
Problem
I saw in the generated code an empty object as default props
props = {}
, this is unneeded asprops
are always objectSolution
Alternatives
no alternative