3 ms·
Even in jsx its not required to add a boolean value. Unless you are passing in a var as a prop in which case sure. But that didn't look like it was the case in
by joshchernoff 2y ago
Even in jsx its not required to add a boolean value. Unless you are passing in a var as a prop in which case sure. But that didn't look like it was the case in these examples.
- ervine 2y agoOne of my favorite eslint rules to enable: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md https://github.com/jsx-eslint/eslint-plugin-react/blob/maste...
- everdimension 2y ago> Even in jsx its not required to add a boolean value Absolutely true! But I like to do it because I personally think it reads more nicely and is more explicit and that's what I do in all my projects. But it is indeed a matter of taste and I have nothing against code that follows the convention to omit the "true" value.