about the styles of parentheses with JSX
See original GitHub issuethis is what i want (styles1)
const SearchAddress = () => (
<div className={styles.container}>
<InputField
name="area"
value=""
iconName="zoom1"
onInputChange={() => {}}
/>
</div>
);
and this is formatted by prettier (styles2)
const SearchAddress = () =>
(<div className={styles.container}>
<InputField
placeholder="小区/街道/写字楼等"
name="area"
value=""
iconName="zoom1"
onInputChange={() => {}}
/>
</div>);
i
i can’t find out the reasons.
some days before when i used prettier-eslint-code i was correct.
and now i change to use prettier with prettier.eslintIntegration settings.
if i just use eslint --fix it diden’t format to styles2.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
When should I use curly braces { } and parenthesis ( ) in React?
Curly braces { } are special syntax in JSX. It is used to evaluate a JavaScript expression during compilation. A JavaScript expression can...
Read more >JavaScript in JSX with Curly Braces - React Docs
JSX attributes inside quotes are passed as strings. · Curly braces let you bring JavaScript logic and variables into your markup. · They...
Read more >React, Part I: JSX Cheatsheet - Codecademy
A JSX expression that spans multiple lines must be wrapped in parentheses: ( and ) . In the example code, we see the...
Read more >What do curly braces mean in JSX (React)? - Stack Overflow
The outer curly braces tell the JSX parser that the syntax should be interpreted as javascript. The inner braces are used because the...
Read more >JavaScript in JSX with Curly Braces - YouTube
When we want to add dynamic content to our HTML-like markup inside a JavaScript file we use curly braces. It's like our window...
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

This issue appears to be resolved as such I am closing it. If you are still having problems please feel free to reopen.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.