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.

Conversion of React JSX Props on newlines fails

See original GitHub issue

JSX 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"
    />
  );
}

Kapture 2020-10-22 at 10 55 51

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
meganroggecommented, Dec 31, 2021

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

1reaction
meganroggecommented, May 25, 2021

Hoping to get to this soon

Read more comments on GitHub >

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

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