Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite connect() for better performance and extensibility #416

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ee4366b
Reimplementing connect() and extracting connectToStore() based on 're…
jimbolla Jun 16, 2016
2aec436
Changes to fix failing tests (4 fails to go)
jimbolla Jun 16, 2016
fe7358c
Change code to make tests for factory mapStateToProps/mapDispatchToPr…
jimbolla Jun 16, 2016
9967a18
Adjust remaining 2 failing tests to account for slightly different be…
jimbolla Jun 16, 2016
a12c1ec
add dispatchable to the exported functions
jimbolla Jun 16, 2016
27f613d
Replace string ref with function ref. Adjust test to match
jimbolla Jun 16, 2016
106ded6
Generalized a couple error messages
jimbolla Jun 16, 2016
cde8ba2
make additional options passed to connect() fall through to connectTo…
jimbolla Jun 16, 2016
5a631ab
rename connectToStore to connectAdvanced
jimbolla Jun 16, 2016
3416b42
pull some utility functions out of connectAdvanced into their own uti…
jimbolla Jun 16, 2016
6786824
refactor connect + connectAdvanced
jimbolla Jun 16, 2016
5e72f23
remove dispatchable()... this probably doesn't need to be a part of r…
jimbolla Jun 16, 2016
7890b4c
remove unneeded selector value on unmount
jimbolla Jun 16, 2016
612562d
avoid excess verify() when using defaultMergeProps
jimbolla Jun 17, 2016
81434df
pull buildSelector out of connectAdvanced... less function nesting
jimbolla Jun 17, 2016
71655ad
refactor connect() selector builders
jimbolla Jun 17, 2016
3266aa9
remove need for explicit factory flags
jimbolla Jun 17, 2016
4dbeeb1
don't do shape verification in production ENV
jimbolla Jun 17, 2016
74e0e09
refactor to split init from trySubscribe
jimbolla Jun 17, 2016
cd75a22
Move subscribe from willMount to didMount to avoid serverside memory …
jimbolla Jun 17, 2016
9de43b2
Remove extra createShallowEqualSelector file since it's not adding mu…
jimbolla Jun 17, 2016
3e1ddbd
move ref/recomputationsProp setters into buildSelector... simplify re…
jimbolla Jun 17, 2016
b769209
refactor + comment advancedConnect
jimbolla Jun 17, 2016
70395c9
pull buildSelector func into own file
jimbolla Jun 17, 2016
2ae0c3c
Make buildSelector injectable into connectAdvanced as another option
jimbolla Jun 17, 2016
e2e7108
refactor+comment connect.js
jimbolla Jun 18, 2016
88e768b
Change the way nested connected components subscribe so that parent c…
jimbolla Jun 18, 2016
d2b9844
Fix failing tests. Change the way nested components subscribe... inst…
jimbolla Jun 18, 2016
859d795
ensure nested subs are notified properly
jimbolla Jun 18, 2016
ce49933
Eliminate extraneous tracking of recomputations count since we can ju…
jimbolla Jun 18, 2016
c72bcc0
simplify nested subs code. no need for extra object wrappers
jimbolla Jun 18, 2016
9fef522
rename shouldUseState to dependsOnState to make its meaning more clear
jimbolla Jun 18, 2016
ed52f05
prebind notifyNestedSubs to avoid extra lambda func
jimbolla Jun 18, 2016
39fbe00
Add WrappedComponent as one of the option params passed to buildSelec…
jimbolla Jun 18, 2016
1b8fb69
Extract Subscription class from connectAdvanced
jimbolla Jun 19, 2016
5f0f85f
Replace reselect with manual memoization in buildSelector. Faster!
jimbolla Jun 19, 2016
03c62ef
refactor buildSelector
jimbolla Jun 19, 2016
0906904
refactor connect()... extract selectors, replace reselect with hand-r…
jimbolla Jun 20, 2016
d4686d8
Re-add isSubscribed() to reduce test delta
jimbolla Jun 20, 2016
a45ae23
refactor buildFactoryAwareSelector and remove extraneous selector ind…
jimbolla Jun 20, 2016
e51315f
improve memoization perf
jimbolla Jun 20, 2016
4969368
refactor connect + selectors for clarity
jimbolla Jun 21, 2016
b1cc3d3
refactor connect + selectors
jimbolla Jun 23, 2016
78045dc
pull apart buildSelector into its pieces and move them into getFinalP…
jimbolla Jun 23, 2016
846c09b
Move where 'extra props' (ref and recomputations) are added to the fi…
jimbolla Jun 23, 2016
ee77f3f
Refactor props memoization
jimbolla Jun 23, 2016
8170f16
Move ownProps memoization into connectAdvanced to simplify selectors.
jimbolla Jun 23, 2016
3287546
utilize memoizeProps in createFactoryAwareSelector
jimbolla Jun 23, 2016
0b9fd95
rename recomputations to renderCount to make its intent clearer
jimbolla Jun 24, 2016
30857f4
refactoring selectors + connect for clarity
jimbolla Jun 24, 2016
1e0a66c
Hide connectAdvanced and advancedOptions
jimbolla Jun 24, 2016
5bc7b83
fix nits
jimbolla Jun 26, 2016
1e7f2d7
fix messed up path
jimbolla Jun 26, 2016
e284d8b
Add guard for the case of a component causing its siblings to unsubsc…
jimbolla Jul 2, 2016
395c4ee
Add comments to connect.js
jimbolla Jul 3, 2016
dab9c85
refactoring + some perf opimizations
jimbolla Jul 9, 2016
cabd376
refactoring+comments for clarity
jimbolla Jul 9, 2016
35d175f
refactoring
jimbolla Jul 9, 2016
67d6e13
Optimize Subscription subscribe/unsubscribe
jimbolla Jul 9, 2016
a604856
comments
jimbolla Jul 9, 2016
652d85c
refactor selectors
jimbolla Jul 10, 2016
d56c36d
rename files
jimbolla Jul 10, 2016
418b659
Change Subscription to follow same subscribe/unsubscribe/notify mecha…
jimbolla Jul 11, 2016
44fd92d
refactoring connect's selectors to move logic to determine what to re…
jimbolla Jul 11, 2016
1cb72c0
refactoring/optimizing connect+selectors
jimbolla Jul 12, 2016
5ec8143
refactoring/optimizing connect+selectors
jimbolla Jul 13, 2016
1120555
Merge selectors and connect.js into a connect folder
jimbolla Jul 14, 2016
55b49b2
comments
jimbolla Jul 14, 2016
86a4bbe
refactoring connect
jimbolla Jul 15, 2016
3cc504f
Optimize connectAdvanced to not create subscription if it shouldn't r…
jimbolla Jul 16, 2016
3c5c80e
Refactor - put dependsOnOwnProps right on the selector func instead o…
jimbolla Jul 16, 2016
de81801
Add test from #293 and uncomment now-passing expect in 'should pass s…
jimbolla Jul 16, 2016
e2df051
Added passing test from #395
jimbolla Jul 16, 2016
e907f85
Add passing test from #429
jimbolla Jul 16, 2016
a6d82f0
Add code + test for #436
jimbolla Jul 16, 2016
a4d3211
Extract buildConnectOptions out of connect()... will make testing easier
jimbolla Jul 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 0 additions & 367 deletions src/components/connect.js

This file was deleted.

Loading