Hacker News new | ask | show | jobs
by bryanrasmussen 856 days ago
Are there potential performance issues to consider with overrides - I'm supposing

const FetchPerson = createOverride(fetchPerson);

must be less performant by some amount than just using fetchPerson? How many over-rides do you find a reasonably complex component needs?

1 comments

React is pretty performant when context isn't changing. We haven't done any benchmarking but I doubt there's any real world perf hit. For large applications the number of overrides tend to be under 20.

Overrides are opt-in so you can just expose any overridable value as a prop and run a isolated component test on it.

cool

any common mistakes you see people make in writing overrides or is it too early to make conclusions?