reactjs - 让WebStorm添加style={}而不是style =""

标签 reactjs webstorm

使用 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/

相关文章:

dart - Dartweb Webstorm,502错误网关

android - React Native 是否带有 Gradle?

javascript - 使用高阶组件的 this.props 在 componentDidUpdate() 内已过时

javascript - Intellij Idea/Webstorm jsdoc分析问题, Unresolved 变量

javascript - Webstorm 7 无法识别 Node API 方法

reactjs - 当 props 通过 React-Redux 连接函数传递时,WebStorm 会突出显示 React 组件

ios - react 导航重置操作不起作用

reactjs - 如何为 img 标签设置默认图像,以防 src 在 React 中无效

reactjs - webpack 捆绑的 React 应用程序中的 node-mssql 错误

javascript - 使用 Webpack 别名会导致在 WebStorm 中导入别名时出现 ESLint 错误