Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How would useEffect () access those dependencies? useEffect() them to determine if f() needs to run again or not.


`{a, b, c}` is a syntax sugar for `{"a": a, "b": b, "c": c}`, i.e. useEffect has access to the dependency values.


> `{a, b, c}` is a syntax sugar for `{"a": a, "b": b, "c": c}`

Not in function arguments. In function arguments that syntax does destructuring.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: