I had a CategoryPicker component which displays a large category tree(hierarchical, about 20,000 nodes), each of the node was bound to a onClick event handler in order to figure out which node the user is clicking.
It turns out to be extremely slow when mounting this component, profiling result shows that EventPluginHub.putListener consumes most of the resources.
The only solution I can think of is using jQuery to bind event handler to it's ancestor, you know, the old school way. But apparently this is against React's design philosophy.
const CategoryPicker = React.createClass({
render() {
return (
// data has about 20,000 elements
{data.map((d) => {
return (
<div onClick={this.handleClick.bind(this, d.cateId)} key={d.cateId}>
{d.cateName}
</div>
);
});}
);
}
});

Update
I've tried remove onClick event handler on the nodes, the performance boost is evident. Guess I have to use the jQuery way to handle this situation right now.