DEV Community

Discussion on: The power of custom hooks in React (responsive design example)

Collapse
 
httpjunkie profile image
Eric Bishard

I'm a big fan of the useMediaPredicate hook from the react-media-hook, but this is an interesting article on building your own custom hook, but I do like that the react-media-hook can be used with any media query. Good job

Collapse
 
mlevi1806 profile image
Matan Levi • Edited

Thanks for the feedback.

I agree that there are libraries providing a large set of features (like react-responsive) and it's nice that you can use them on-the-go.
On the other hand, it is nice to figure out what you need and add it to your own hook + the pros I've mentioned above