Created
January 18, 2020 21:32
-
-
Save davidcostadev/6334e28e8bf863ac843bf069de5d127c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hook/useName.js | |
import { useEffect, useState } from 'react'; | |
const useName = () => { | |
const [name, setName] = useState(''); | |
useEffect(() => { | |
setName('asdasdas') | |
}, []) | |
return [name, setName] | |
} | |
export { useName } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment