TIL @intellijidea/@WebStormIDE automatically converts React class components to functional and vice-versa.
Not sure which version added it, but I've been doing this manually since ever and this is great!
Now it would be fantastic if it preserved imports order and comments.
pic.twitter.com/NiA1Pf5g56
Sorry, can only reproduce that when Sort imports by module and Sort imported members are checked in the code style settings.
-
-
Disabling both did indeed prevent it, was previously only disabling the first. Thanks! Only remaining issue is comments being stripped when converting to class. It doesn't happen when converting to functional. Should I raise a bug for this one?
-
Great!
Please report an issue on our tracker: https://youtrack.jetbrains.com/issues/WEB Code sample would help a lot. - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.