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

Discussion (8)

Collapse
thisdotmedia_staff profile image
This Dot Media

This is great! Thanks for sharing Dmitry 😊

Collapse
dmtrshat profile image
Dmitry Shatokhin Author

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 Author

Aww, thank you πŸ™
I'll definitely look through this page πŸ˜‰

Collapse
joaquinwojcik profile image
Joaquin Wojcik

Very very interesting. Thanks!

Collapse
dmtrshat profile image
Dmitry Shatokhin Author

Thanks 😊

Collapse
manuelalonge profile image
Manuel Alonge

Very useful :)

Collapse
dmtrshat profile image
Dmitry Shatokhin Author

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