Spread children not supported
See original GitHub issueconst F = () => <a>{...[]}</a>;
crashes sucrase with:
Error transforming sample.tsx: Unterminated regular expression (1:29)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Spread children are not supported in React : r/reactjs - Reddit
The one that's causing the error, is that you are trying to render the rest arguments, rather than passing them as props to...
Read more >React.js - this.props.children an object when spreading the ...
children is converting to an object when I spread the result of a .map() from the parent. example: const items = [ {...
Read more >React Children And Iteration Methods - Smashing Magazine
While working with React, most of the time we do not touch the children prop any more than using it in React components...
Read more >Using Children in React - We Learn Code
Using Children in React. You can use props.children in React in order to access and utilize what you put inside the open and...
Read more >Schools and Childcare Programs | COVID-19 - CDC
See ongoing mitigation guidance and prevention and support for ... the spread of COVID-19 and maintain safe operations in schools, child care programs, ......
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
I just released a fix for this in 3.10.0.
Yeah I’m using React. FWIW this is syntax that Typescript supported. My understanding of this syntax is that it’s for places where you have an array but know it’s actually static and unchanging, so that keys are not necessary (so React can spread them out as if they were positional args to createElement). It’s also useful when you’re transplanting
children
from one place to another.I don’t know why Babel chokes on this, though I’ve seen a higher rate of bugs in Babel than TSC so far since the switch in create react app 2.0 (random example).
Thanks!
On Fri, Feb 22, 2019 at 7:14 AM Alan Pierce notifications@github.com wrote: