-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Projects/App.js: memoize all the things
We do not need or want to recalculate all of this stuff on every render of App.js. In particular, this caused the entire Tabs bar and TabAction (with associated MiniFilterBar) to be removed from the DOM and re-added on every render. This caused problems with the openerRef being passed into TextFilter. Upon closer inspection, I was also able to remove all props from TextFilter. None of these needed to be passed in. The openerRef was being set and used entirely within the component, and managing the state from outside the component caused problems rather than solving them.
- Loading branch information
Chad Ostrowski
committed
Nov 27, 2019
1 parent
5d8d8ce
commit 7c1af58
Showing
3 changed files
with
80 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters