使用 WebStorm 进行 React 工作,我很乐意设置 WebStorm 的代码完成功能以提供:
<div style={}...
而不是:
<div style=""...
有什么方法可以实现这种行为吗?
最佳答案
升级至2016.2。现在就这样做了。
来自他们的What's new :
WebStorm can now provide code completion and resolve for component properties defined using propTypes. For React events the IDE will automatically add {} instead of "". Non-DOM attributes are no longer marked as unresolved, and similarly, component lifecycle methods are not marked as unused anymore.
关于reactjs - 让WebStorm添加style={}而不是style ="",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38354101/