2 ms·
To add to this, the React docs state you should never rely on renders for side effects. In dev mode, React will even render your components twice to suss out an
by city41 6y ago
To add to this, the React docs state you should never rely on renders for side effects. In dev mode, React will even render your components twice to suss out any render relying side effect bugs. Your component should always work the same whether it's rendered once or rendered a million times.