question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on React fragments short syntax

See original GitHub issue

Hi, 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

https://reactjs.org/docs/fragments.html#short-syntax

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eugene-beliaevcommented, Oct 27, 2018

@yamafaktory thanks

0reactions
yamafaktorycommented, Nov 3, 2018

Oh my bad… @underblob https://github.com/yamafaktory/shrimpit/tree/v0.21.1 has been released & published to NPM this time 😅.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found