JSX - Should we inline single tags
See original GitHub issueExtracted from https://github.com/prettier/prettier/pull/1831
At the moment the new JSX formatting behaviour doesn’t inline JSX elements contains a single tag.
So this:
<div><a>Click me</a></div>
Is converted to:
<div>
<a>Click me</a>
</div>
There was some previous discussion about allowing single tags to be inlined (https://github.com/prettier/prettier/pull/1831#discussion_r120167331).
I’ve created this issue as a place for us to continue this discussion.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Inline Styling with React - Pluralsight
The official React documentation frowns upon the use of inline styling as a primary means of styling projects and recommends the use of...
Read more >React.js inline style best practices [closed] - Stack Overflow
In inline style tags you can't use media queries or pseudo selectors. Using CSS in JS, you can enjoy the best of both...
Read more >Why you shouldn't use inline styling in production React apps
One of the reasons why the inline styling is very famous and used is because when a new developer is starting to learn...
Read more >How To Use Inline Functions In React Applications Efficiently
This blog post explores the performance cost of inline functions in a React application. Before we begin, let's try to understand what inline...
Read more >HTML vs JSX – What's the Difference? - freeCodeCamp
One of the major differences between HTML and JSX is that in JSX, you must return a single parent element, or it won't...
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 Free
Top 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
I really like the more clear look of the current behavior even if it is a bit verbose.
I think that always expanding is fine.