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
true
false
If you create a component with a default boolean prop set to true, like this:
class DefaultPropsComponent extends React.Component {} DefaultPropsComponent.defaultProps = {test: 'test', something: true};
and then render an instance of that component where the prop is false:
reactElementToJSXString(<DefaultPropsComponent something={false} />, {showDefaultProps: false}) // Result: <DefaultPropsComponent />
the resulting string does not include something={false} as expected.
something={false}
I'll submit a PR momentarily!
The text was updated successfully, but these errors were encountered:
Resolves algolia#67
d89ae78
Fix an issue where boolean props with a default value of `true` are not rendered when their value is `false`
Resolves #67 (#68)
d7343da
I just updated to 5.0.4 but still can't get a foobar={false} to render.
5.0.4
foobar={false}
I will try to narrow down to a bare repo example.
Sorry, something went wrong.
Ok that would be great, maybe it did not build properly? Check what's inside node_modules and let us know, feedback counts!
No branches or pull requests
If you create a component with a default boolean prop set to
true
, like this:and then render an instance of that component where the prop is
false
:the resulting string does not include
something={false}
as expected.I'll submit a PR momentarily!
The text was updated successfully, but these errors were encountered: