News for hackers. Stuff that matters.
Re:React: You Might Not Need an Effect by rk06 on Thursday March 23, 2023 @12:20PM (#35277129)
How would useEffect () access those dependencies? useEffect() them to determine if f() needs to run again or not.
Re:React: You Might Not Need an Effect by vbezhenar on Thursday March 23, 2023 @01:04PM (#35277791)
`{a, b, c}` is a syntax sugar for `{"a": a, "b": b, "c": c}`, i.e. useEffect has access to the dependency values.
Re:React: You Might Not Need an Effect by dalmo3 on Friday March 24, 2023 @09:58AM (#35289154)
> `{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.