Skip to content

Instantly share code, notes, and snippets.

@yuritoledo
Created November 18, 2019 23:53
Show Gist options
  • Save yuritoledo/3dcbf1b67d3d0a02627d4f0e72569fab to your computer and use it in GitHub Desktop.
Save yuritoledo/3dcbf1b67d3d0a02627d4f0e72569fab to your computer and use it in GitHub Desktop.
const [primaryAddress, setPrimaryAddress] = useState('')
const [secondaryAddress, setSecondaryAddress] = useState('')
useEffect(() => {
setPrimaryAddress(props.priAddress)
}, [props.priAddress])
useEffect(() => {
setSecondaryAddress(props.secAddress)
}, [props.secAddress])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment