Error on React fragments short syntax
See original GitHub issueHi, I’m seeing the tool exits with an error when it gets to a React fragment written in short syntax (<> ... </>
):
! SyntaxError: Unexpected token (17:3) in src/components/[ ... ].js
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
React fragment shorthand failing to compile - Stack Overflow
Failed to compile ./src/testingFragments.js Syntax error: Unexpected token (6:4) 4 | render ...
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 >Shorthand Fragment is not working if React is not in the scope ...
Shorthand Fragment is not working if React is not imported. You have to include React or import Fragment and use it.
Read more >Compile error: I can't use "<>" and "</>" anymore? : r/reactjs
Syntax error: Unexpected token (95:21) ...which points to the first occurrence of <> in any file if I put them back in. I...
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 FreeTop 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
Top GitHub Comments
@yamafaktory thanks
Oh my bad… @underblob https://github.com/yamafaktory/shrimpit/tree/v0.21.1 has been released & published to NPM this time 😅.