3 ms·
The idea with them is to “break” reactivity. In the local space where you define them that’s totally fine because you’re obviously doing it in order to have use
by aidos 4y ago
The idea with them is to “break” reactivity. In the local space where you define them that’s totally fine because you’re obviously doing it in order to have useEffects that only run when their real dependencies change.
If these are passed down you’re invisibly breaking the reactivity of the child components. It’ll be too easy to shoot yourself in the foot in a child component by assuming that that you can use one of these in your own useEffect.
- febusravenga 4y agoI really strive to find actual example of shooting myself in foot with passing "stable" callback to component below. Like, do you know if there is actual example somewhere, where things break? They (react devs) only talk about something concurrent, but no actual code, only hand waving potential dangers.