2023-05-16
4472
#react
Peter Ekene Eze
10577
May 16, 2023 â‹… 15 min read

Building reusable UI components with React Hooks

Peter Ekene Eze Learn, Apply, Share

Recent posts:

How To Use ForwardRef In React

React forwardRef explained: Usage, alternatives, and React 19 update

ForwardRef lets you pass refs through components to access child DOM nodes directly — learn how and when to use it in React 18 and earlier.

Peter Ekene Eze
Jun 3, 2025 â‹… 14 min read
Improving Frontend Workflows With In-Browser Database Tools

​​Improving frontend workflows with in-browser database tools

In-browser database tools like RxDB and Neo4j Sandbox help frontend devs manage data, work offline, and streamline tasks with AI support.

Jude Miracle
Jun 3, 2025 â‹… 7 min read
How To Iterate Over Enums In TypeScript

How to iterate over enums in TypeScript (with code examples)

Learn exactly how to iterate over numeric and string enums in TypeScript, with practical code snippets and type-safe patterns.

Matteo Di Pirro
Jun 2, 2025 â‹… 9 min read
How To Import SVGs Into Your Next.js Apps

How to import SVGs into your Next.js apps: A 2025 guide

Learn the best 2025 methods to import SVGs in Next.js 14+, with tips on performance, styling, and App Router integration.

Joseph Mawa
Jun 2, 2025 â‹… 9 min read
View all posts

3 Replies to "Building reusable UI components with React Hooks"

  1. There is more wrong things and anti patterns. for example this useEffect

    useEffect(() => {
    setTimeout(() => {
    setShow(false);
    }, 3000);
    });

    where is return statment for this setTimeout , or value depenedency. Come on, it will run every component update. You dont want this defenietly..

Leave a Reply