Skip to content

style={false} produces eslint warning #68

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

Closed
intrueder opened this issue Nov 2, 2017 · 1 comment
Closed

style={false} produces eslint warning #68

intrueder opened this issue Nov 2, 2017 · 1 comment

Comments

@intrueder
Copy link

The warning is Enforce style prop value being an object (react/style-prop-object)
Is it possible to make the component be able to work with style={null} to disable inline styles?
It's not a big deal to disable warning, but style={false} is a bit confusing

@vlad-ignatov
Copy link
Owner

style={null} or style={{}} means "I don't have any custom styles that I want to apply" and style={false} means "please don't apply any styles". However, eslint is great tool that I respect and that is why style={false} is deprecated (still works). You can now use the new noStyle boolean prop for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants