If I have 100 Objects in an array and for each object If I define an anonymous function for each object then will it take memory for 100 function(For onClick function), if yes then how to avoid it and if No then How JS manage it?
Code Example -
var a = [{a:1},{a:2},{a:3},...{a:100}];
var html = a.map((item, i) => (
<div className={Styles.someCss} key={i}>
<Component
onClick={() => { this.someFunction(item) }}
/>
</div>
));