[英]Using react-with-styles in recompose
Can someone help me with an example of applying styles using react-with-styles in a higher order component using recompose ? 有人可以帮我举一个使用recompose在更高阶组件中使用react-with-styles应用样式的示例吗?
Specifically, how can we apply styles as explained in this example -- https://github.com/airbnb/react-with-styles#how-to-use -- in a higher order recompose wrapper ? 具体来说,如何按照本示例中的说明应用样式-https: //github.com/airbnb/react-with-styles#how-to-use-以更高的顺序重新包装?
The compose HOC allows you to create components via composition eg: compose HOC允许您通过合成来创建组件,例如:
export default compose(
withStyles,
withState('toggleOn', 'toggle', false)
)(Component)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.