5 ms·
"The React style forces a lot more object creation and copying then you're probably imagining." Its not react style its literally the core of how react works(i
by shmde 3y ago
"The React style forces a lot more object creation and copying then you're probably imagining."
Its not react style its literally the core of how react works(immutablity). To rerender a component you need the new state to point towards a new reference to an object/array (hence the copying data to a new array) because JS compares objects/arrays through reference and not value. Not exactly react's
fault but how JS works.
- nitwit005 3y agoI said "react style" because they are not using React in a conventional way: https://github.com/kevzettler/react-regl https://github.com/kevzettler/react-regl