Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

VSCode does not format JSX Correctly

$
0
0

If I have:

<Button
  onClick={ this.handleCreateFormOpen }
/>

And I type SHIFT + OPTION + F

Then my JSX is formatted like so:

<Button
  onClick={this.handleCreateFormOpen}
/>

I want this: onClick={ this.handleCreateFormOpen }

I am Android Dev and in Android Studio I can change the formatting as i choose, is there an option like that in VSCode?

I want to be able to type SHIFT + OPTION + F and VSCode format my code like onClick={ this.handleCreate } instead of onClick={this.handleCreateFormOpen} is this possible?


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>