Skip to content

Instantly share code, notes, and snippets.

@ndudar
Last active February 14, 2023 21:23
Show Gist options
  • Save ndudar/d3f876ee4b69c96c2c6a4a391a867578 to your computer and use it in GitHub Desktop.
Save ndudar/d3f876ee4b69c96c2c6a4a391a867578 to your computer and use it in GitHub Desktop.
Pseudocode for the custom Hook
import React, { useState, useEffect } from "react"
const useMyCustomHook = (param) => {
const[data, setData] = useState(null)
useEffect(() => {
useEffect logic
}, [param])
return { data }
}
export default useMyCustomHook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment