Disabling automatic curly brackets after = in React

Hi,

I'm writing a React app in WebStorm, and am a novice at the topic. I've noticed that when typing = after certain declaration curly brackets instantly come up, when most of the time the parameter would require quotes around it. Below is a GIF that probably explains what I mean better:

 

i was wondering if there was a way to either change this feature to print quotes instead of curly brackets, or to turn it off completely?

 

Thanks in advance!

11
7 comments

You can set Add for JSX attributes: to None in Settings | Editor | Code Style | HTML | Other to disable them, or to Based on type to have either braces or quotes auto-completed depending on props type

26
Avatar
Permanently deleted user

That worked perfectly! Thank you!

2

Thank you very much!

0

THANK YOU!!!!! This issue was driving me CRAZY!!!!!!!!!!!!! Solved using above. 

0

You can also set it to "Based on type". For strings it'll add quotes, and for for example, numbers, curly braces

2

Thank you, this should be the default behavior

0

Please sign in to leave a comment.