Apart from needing to create a new function each time render
is invoked, are there any other differences from using:
class {
on = () => true
render = () => <z on={this.on} />
}
vs
class {
render = () => <z on={() => true} />
}
For example, are there any optimizations that browsers make? Are there any implementation differences?
If there are zero differences, would it make sense for something like bable to transform the code to avoid creating the function in the render
function?