DEV Community

Cover image for A small collection of useful React hooks.
Dmitry Shatokhin
Dmitry Shatokhin

Posted on • Updated on

A small collection of useful React hooks.

I often have to find different implementations of the same things in projects. I singled out for myself the most common and leave links to ready-made solutions.

REMARK
This is not a typical article. Now I support the project on React and have encountered this. So I decided to share

useFetch

useFetch - Fetch API in the implementation of the hook.

useApi

useApi - Same as useFetch, only made with axios.

useWindowScrollPosition

useWindowScrollPosition - Helps to track the position of the cursor.

useLocalStorage

useLocalStorage - Various operations with local storage.

useDocumentTitle

useDocumentTitle - Allows you to set the title of the document.

useOnlineStatus

useOnlineStatus - Check the status of the network.

useClippy

useClippy - Adding to the clipboard.

useScript

useScript - Allows you to dynamically download external scripts.


Afterword.

Thank you very much for your attention. I hope it was useful for you 🙏
Follow me, it makes me write new articles 😌
I'd be happy for your feedback.
C u! 😉

Buy Me A Coffee

Top comments (7)

Collapse
 
thisdotmedia_staff profile image
This Dot Media

This is great! Thanks for sharing Dmitry 😊

Collapse
 
dmtrshat profile image
Dmitry Shatokhin

Thanks too 😊

Collapse
 
tkudlinski profile image
Tomasz Kudlinski

Great article! This page is also useful: nikgraf.github.io/react-hooks/

Collapse
 
dmtrshat profile image
Dmitry Shatokhin

Aww, thank you 🙏
I'll definitely look through this page 😉

Collapse
 
dmtrshat profile image
Dmitry Shatokhin

I'm very glad to hear it!
Thank you 😌

Collapse
 
joaquinwojcik profile image
Joaquin Wojcik

Very very interesting. Thanks!

Collapse
 
dmtrshat profile image
Dmitry Shatokhin

Thanks 😊