const someFunction = () => {
  // do anything in the function
}

function TheComponent() {
  useEffect(someFunction) // you pass the function you want to run after every render

  return <div>.....</div>
}

// However, generally this whole process is short-circuited by using
// an anonymous arrow function directly in useEffect()
function TheComponent() {
  useEffect(() => {
    // do anything you want to do here.
  })

  return <div>.....</div>
}