3 ms·
It is fired on every instance of the component. However, if you create the arrow function in the render function, it'll be created for every render. Since React
by aenigmaclamo 8y ago
It is fired on every instance of the component. However, if you create the arrow function in the render function, it'll be created for every render. Since React keeps the component instances around between renders, it can be a lot better.
- mercer 8y agoAh, that makes sense. Do you by any chance know of any articles that go further into how this works?
- RunawayGalaxy 8y agohttps://pbs.twimg.com/media/DZ-97vzW4AAbcZj.jpg:large https://pbs.twimg.com/media/DZ-97vzW4AAbcZj.jpg:large
- mercer 8y agoPerfect!