Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Avoid binding in render #46

Open
gcazaciuc opened this issue Jun 12, 2016 · 0 comments
Open

Avoid binding in render #46

gcazaciuc opened this issue Jun 12, 2016 · 0 comments

Comments

@gcazaciuc
Copy link

The render code in ui.js uses the binding operator to pass updateUI and resetUI to the underlying component. This creates new functions at each render pass since behind the scenes it is compiled to this.updateUI.bind(this) and this.resetUI.bind(this) leading to 2 issues:

  1. It cancels out shallowEqual/pure render mixin from any subcomponents they are passed to as props
  2. It needlesly creates new functions at each render pass.
gcazaciuc pushed a commit to gcazaciuc/redux-ui that referenced this issue Jun 12, 2016
ghost pushed a commit to AoD-Technologies/react-redux-ui-tools that referenced this issue Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant