Conversion of React JSX Props on newlines fails
See original GitHub issueJSX props (React) on their own lines do not convert correctly to template strings:
function Div(props) {
return (
<div
{...props}
prop-on-new-line="abc"
// comment
another-on-new-line="def"
/>
);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:19 (10 by maintainers)
Top Results From Across the Web
newlines character ignored by jsx table - Stack Overflow
var TextLines = React.createClass({ render: function() { var lines = this.props.
Read more >JSX In Depth - React
If you want to test out how some specific JSX is converted into JavaScript, you can try out the online Babel compiler.
Read more >Repeating Elements - Fullstack React
Since JSX is seen as plain JavaScript by the browser, we can use any ole' ... React expects us to uniquely identify components...
Read more >How to Set Up VS Code for React Development - SitePoint
convert HTML code into valid JSX syntax while pasting. This means attributes such as class will be converted to className . This is...
Read more >Make line breaks work when you render text in a React or Vue ...
Sometimes you just want those pesky newline characters to actually work!. Tagged with react, vue, css, javascript.
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
that’s a case I don’t have time for at the moment, but about to push a fix for the other cases you mention in this issue.
Done
Hoping to get to this soon