简体   繁体   中英

How can I delete autocompletation for React in WebStorm?

I'm using WebStorm from JetBrains to write my React code. But every time that I write some attribute inside a <Component> immediately the IDE adds me curly braces.

For example:

<Container
   src={}
>
...
</Container>

I don't want to have the curly braces in my code, where can I change this? I was trying to look in JavaScript's and React's configuration, but I can't find it.

Please try setting Add for JSX attributes: to Quotes in Preferences | Editor | Code Style | HTML | Other to have quotes added always, or to Based on type to have either braces or quotes auto-completed depending on props type

You can control this behavior:

File | Settings | Editor | Code Style | HTML | Add for JSX attributes

The "Add for JSX attributes" setting is under the "Other" tab:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM