4 ms·
Effects are not required to be idempotent, so it's not just an optimisation. React documentation has an example where the effect establishes a network connectio
by tuukkah 3y ago
Effects are not required to be idempotent, so it's not just an optimisation. React documentation has an example where the effect establishes a network connection. Even if there's time to connect between renders, the remote system doesn't necessarily handle such short-lived connections.