为什么 styled-components 5.x 警告 "Expected style to contain units."
Why does styled-components 5.x warn about "Expected style to contain units."
当使用样式化组件设计 React Native 应用程序样式时 5.x 我收到警告...
Expected style "borderWidth: 2" to contain units.
以前的版本不会发生这种情况。
警告是什么意思?
在对 github 进行了一些研究和提问后,我找到了这个...
Styled Components 使用包 css-to-react-native 进行 React Native 转换。
css-to-react-native 最近发布的版本 3 现在要求所有测量都存在单位。 Details here.
你应该为 React Native 使用 px
,因为它是 density independent。
当使用样式化组件设计 React Native 应用程序样式时 5.x 我收到警告...
Expected style "borderWidth: 2" to contain units.
以前的版本不会发生这种情况。
警告是什么意思?
在对 github 进行了一些研究和提问后,我找到了这个...
Styled Components 使用包 css-to-react-native 进行 React Native 转换。
css-to-react-native 最近发布的版本 3 现在要求所有测量都存在单位。 Details here.
你应该为 React Native 使用 px
,因为它是 density independent。