简体   繁体   中英

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 ?

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 ?

The compose HOC allows you to create components via composition eg:

export default compose(
    withStyles,
    withState('toggleOn', 'toggle', false)
)(Component)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM