useState()
useEffect()
<SohanPortfolio />
// comment
default
useContext()
useReducer()
;
useCallback()
useMemo()
useRef()
// mobile.render()
export
debugger
{}
return (
main()
class
namespace

Code Snippets

A collection of useful code snippets and projects

Custom Hook: useLocalStorage

A custom React hook to easily use localStorage with React state

reacttypescripthooks
Copy

Debounce Hook

A custom hook to debounce fast-changing values like search inputs

reacttypescripthooksperformance
Copy

Click Outside Hook

A hook that triggers a callback when clicking outside a specified element

reacttypescripthooksui
Copy

Dark Mode Hook

A hook to handle dark mode with system preference detection

reacttypescripthooksdark-modeui
Copy

Pagination Hook

A custom hook for handling pagination logic

reacttypescripthookspagination
Copy

API Fetch Hook

A custom hook for handling API requests with loading and error states

reacttypescripthooksapifetch
Copy

Want to see more?

Check out my GitHub profile for more code examples and projects.