You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JSX spread operator syntax error on the flow parser #3898
lang:flowIssues affecting Flow-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.
What does this even do? the Babel 6 REPL passes the spread through unchanged, even in ES5 mode. Babel can’t parse the result in standards mode, either.
I have some more context. In React currently we don't need to use ... because the type of a child in React is either an object or an array of objects. We're playing around with a version of React that doesn't handle arrays and you've got to manually spread in order to get the same behavior. We have a custom jsx transform step for it.
It's unclear at this point if we are going to move forward with it but the latest version of both flow and babylon are parsing it so it shouldn't be a burden on prettier to print it.
Reacted by Adam Ernst, Andres Suarez, Brian Ng, Lily Skye and Jed Fox
lang:flowIssues affecting Flow-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.
Activity
j-f1 commentedon Feb 6, 2018
What does this even do? the Babel 6 REPL passes the spread through unchanged, even in ES5 mode. Babel can’t parse the result in standards mode, either.
vjeux commentedon Feb 6, 2018
I have some more context. In React currently we don't need to use
...because the type of a child in React is either an object or an array of objects. We're playing around with a version of React that doesn't handle arrays and you've got to manually spread in order to get the same behavior. We have a custom jsx transform step for it.It's unclear at this point if we are going to move forward with it but the latest version of both flow and babylon are parsing it so it shouldn't be a burden on prettier to print it.
mroch commentedon Feb 6, 2018
react/jsx#57
It's part of JSX now