renatorib / react-sizes

:left_right_arrow: Hoc to easily map window sizes to props.
722 stars 36 forks source link

Use with Context API #37

Open jp-signum opened 5 years ago

jp-signum commented 5 years ago

How would you use this with a functional or class component that requires the use of the context API to retrieve data from elsewhere in your application. It seems to be completely breaking my component. From your docs it seems like formerly recompose and now Hooks might be the answer but I cant seem to get anything I try to work so wondering if you had any best practices or ideas. Also noticing on components with any form of prop propagation that the examples or docs you provide do not provide a way to use this.

damiangreen commented 5 years ago

Where does it mention hooks in their docs? I'd like to try using hooks myself with this.