dy / unihooks

Universal unreacted hooks
MIT License
21 stars 1 forks source link

useState / useEffect async #35

Closed dy closed 4 years ago

dy commented 4 years ago

Make useState support async init, to avoid

let [value,setValue] = useState()
useEffect(async () => {
  setValue()
}, [])
dy commented 4 years ago

Deps are updated, not our business anymore.