A new WebStorm 2018.2 EAP is now available! What’s new: - Extract React component refactoring - Global File Watchers - Improved support for Angular CLI schematics - Rerun failed tests More in https://blog.jetbrains.com/webstorm/2018/06/webstorm-2018-2-eap-182-3341 …pic.twitter.com/NhH8YwiYpd
-
-
Replying to @WebStormIDE
Hmm class based component extending PureComponent by default?
1 reply 0 retweets 0 likes -
-
Replying to @Kelset @WebStormIDE
I personally would default to a functional component.
1 reply 0 retweets 3 likes -
We've been thinking a lot about the defaults and decided to go with PureComponent for class components and function (vs arrow function) for functional. But it's all customizable. We hope to get the feedback on that now, before the stable release and make changes if needed.
2 replies 0 retweets 1 like -
I think the option that makes most sense is functional component by default, with the “class” option being React.Component.
1 reply 0 retweets 9 likes -
Dan, Oleg, thanks for the feedback, it's really valuable for us now! We'll give it a second thought and try the new defaults in the next week's EAP build.
2 replies 0 retweets 7 likes -
Replying to @WebStormIDE @dan_abramov and
I agree with
@dan_abramov that converting to a functional component would be best. While we are on the topic, another common task is converting a functional component to class Component. That would be a welcome sibling feature to this one.2 replies 0 retweets 2 likes -
Replying to @stevensacks
It's very easy to switch to the functional style when doing a refactoring; the selected style is then used next time you use this refactoring. By the way, do you prefer using arrow functions in this case?
2 replies 0 retweets 0 likes
Converting is a good idea! Not sure we'll be able to get it in time for the WebStorm 2018.2 release but maybe in 2018.2.x or 2018.3
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.