'Fragment' is not defined
See original GitHub issuepackage.json
"babel-core": "^6.26.0",
"babel-preset-react": "^6.24.1",
"eslint": "4.12.1",
"babel-eslint": "^8.0.3",
"react": "^16.2.0",
"react-dom": "^16.2.0",
In code
return (
<Fragment>
... code
</Fragment>
);
here is the error:
Error:(9, 10) ESLint: 'Fragment' is not defined. (react/jsx-no-undef)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
'Fragment' is not defined · Issue #1579 · jsx-eslint ... - GitHub
React.Fragment exists in v16.2, but not Fragment .
Read more >Flow errors on <React.Fragment> or <></>, but not <Fragment>
When I dig into the react.js lib def referenced in the error it does appear that the error is factually correct - the...
Read more >Fragments - React
A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding...
Read more >Line 12:6: 'Fragment' is not defined react/jsx-no-undef Code ...
Answers related to “Line 12:6: 'Fragment' is not defined react/jsx-no-undef” · firebase is not defined no undef · [Design System React] App element...
Read more >Understanding React fragments - LogRocket Blog
Fragments are syntax that allow us to add multiple elements to a React component without wrapping them in an extra DOM node. ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I use to, but I want to use <> syntax 😃
The error is reported by the rule in eslint-plugin-react. We do not maintain that plugin. You probably want to file the issue there.