Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.3k
Rewrite connect() for better performance and extensibility#416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes from1 commit
Commits
Show all changes
76 commits Select commitHold shift + click to select a range
ee4366b Reimplementing connect() and extracting connectToStore() based on 're…
jimbolla2aec436 Changes to fix failing tests (4 fails to go)
jimbollafe7358c Change code to make tests for factory mapStateToProps/mapDispatchToPr…
jimbolla9967a18 Adjust remaining 2 failing tests to account for slightly different be…
jimbollaa12c1ec add dispatchable to the exported functions
jimbolla27f613d Replace string ref with function ref. Adjust test to match
jimbolla106ded6 Generalized a couple error messages
jimbollacde8ba2 make additional options passed to connect() fall through to connectTo…
jimbolla5a631ab rename connectToStore to connectAdvanced
jimbolla3416b42 pull some utility functions out of connectAdvanced into their own uti…
jimbolla6786824 refactor connect + connectAdvanced
jimbolla5e72f23 remove dispatchable()... this probably doesn't need to be a part of r…
jimbolla7890b4c remove unneeded selector value on unmount
jimbolla612562d avoid excess verify() when using defaultMergeProps
jimbolla81434df pull buildSelector out of connectAdvanced... less function nesting
jimbolla71655ad refactor connect() selector builders
jimbolla3266aa9 remove need for explicit factory flags
jimbolla4dbeeb1 don't do shape verification in production ENV
jimbolla74e0e09 refactor to split init from trySubscribe
jimbollacd75a22 Move subscribe from willMount to didMount to avoid serverside memory …
jimbolla9de43b2 Remove extra createShallowEqualSelector file since it's not adding mu…
jimbolla3e1ddbd move ref/recomputationsProp setters into buildSelector... simplify re…
jimbollab769209 refactor + comment advancedConnect
jimbolla70395c9 pull buildSelector func into own file
jimbolla2ae0c3c Make buildSelector injectable into connectAdvanced as another option
jimbollae2e7108 refactor+comment connect.js
jimbolla88e768b Change the way nested connected components subscribe so that parent c…
jimbollad2b9844 Fix failing tests. Change the way nested components subscribe... inst…
jimbolla859d795 ensure nested subs are notified properly
jimbollace49933 Eliminate extraneous tracking of recomputations count since we can ju…
jimbollac72bcc0 simplify nested subs code. no need for extra object wrappers
jimbolla9fef522 rename shouldUseState to dependsOnState to make its meaning more clear
jimbollaed52f05 prebind notifyNestedSubs to avoid extra lambda func
jimbolla39fbe00 Add WrappedComponent as one of the option params passed to buildSelec…
jimbolla1b8fb69 Extract Subscription class from connectAdvanced
jimbolla5f0f85f Replace reselect with manual memoization in buildSelector. Faster!
jimbolla03c62ef refactor buildSelector
jimbolla0906904 refactor connect()... extract selectors, replace reselect with hand-r…
jimbollad4686d8 Re-add isSubscribed() to reduce test delta
jimbollaa45ae23 refactor buildFactoryAwareSelector and remove extraneous selector ind…
jimbollae51315f improve memoization perf
jimbolla4969368 refactor connect + selectors for clarity
jimbollab1cc3d3 refactor connect + selectors
jimbolla78045dc pull apart buildSelector into its pieces and move them into getFinalP…
jimbolla846c09b Move where 'extra props' (ref and recomputations) are added to the fi…
jimbollaee77f3f Refactor props memoization
jimbolla8170f16 Move ownProps memoization into connectAdvanced to simplify selectors.
jimbolla3287546 utilize memoizeProps in createFactoryAwareSelector
jimbolla0b9fd95 rename recomputations to renderCount to make its intent clearer
jimbolla30857f4 refactoring selectors + connect for clarity
jimbolla1e0a66c Hide connectAdvanced and advancedOptions
jimbolla5bc7b83 fix nits
jimbolla1e7f2d7 fix messed up path
jimbollae284d8b Add guard for the case of a component causing its siblings to unsubsc…
jimbolla395c4ee Add comments to connect.js
jimbolladab9c85 refactoring + some perf opimizations
jimbollacabd376 refactoring+comments for clarity
jimbolla35d175f refactoring
jimbolla67d6e13 Optimize Subscription subscribe/unsubscribe
jimbollaa604856 comments
jimbolla652d85c refactor selectors
jimbollad56c36d rename files
jimbolla418b659 Change Subscription to follow same subscribe/unsubscribe/notify mecha…
jimbolla44fd92d refactoring connect's selectors to move logic to determine what to re…
jimbolla1cb72c0 refactoring/optimizing connect+selectors
jimbolla5ec8143 refactoring/optimizing connect+selectors
jimbolla1120555 Merge selectors and connect.js into a connect folder
jimbolla55b49b2 comments
jimbolla86a4bbe refactoring connect
jimbolla3cc504f Optimize connectAdvanced to not create subscription if it shouldn't r…
jimbolla3c5c80e Refactor - put dependsOnOwnProps right on the selector func instead o…
jimbollade81801 Add test from #293 and uncomment now-passing expect in 'should pass s…
jimbollae2df051 Added passing test from #395
jimbollae907f85 Add passing test from #429
jimbollaa6d82f0 Add code + test for #436
jimbollaa4d3211 Extract buildConnectOptions out of connect()... will make testing easier
jimbollaFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Changes to fix failing tests (4 fails to go)
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit2aec4363aa070e0da59ce92efb24bbe8adff14cb
There are no files selected for viewing
8 changes: 7 additions & 1 deletionsrc/components/connectToStore.js
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.