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
Would be nice to have a rule for preferring <React.Fragment> over <>. Would love to try tackling this myself if I have the time.
The text was updated successfully, but these errors were encountered:
Hmm, what's the justification for this @rherms? Just to make things more readable?
Sorry, something went wrong.
Yeah readability and the fact that fragments are still relatively new so people might not know what <> means.
I dont have much of an opinion here. One other advantage of <React.Fragment> vs <> is that <> cannot have attributes so for keyed fragments you need to use <React.Fragment> (https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html#keyed-fragments)
Instead of preferring React.Fragment over <>, I think that it could be valuable to be enforce the usage of either one for consistency.
I agree that it would be better for the rule to enforce consistency similar to this eslint rule - https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
Closing due to deprecation timeline, see #210
No branches or pull requests
Would be nice to have a rule for preferring <React.Fragment> over <>. Would love to try tackling this myself if I have the time.
The text was updated successfully, but these errors were encountered: