Commit fa58572
Use Hooks internally (aka 7.0) (#1209)
* Update React to latest
* Update React peer dependency to 16.8.x
* Initial re-implementation of `connectAdvanced` using hooks
Matches changes from v7.0.0-alpha.1
* Update tests to match v7-alpha.1 behavior
Added rtl.act() calls around dispatches and other component updates
Added clarification on expected mapState calls in some places
Disabled some no-longer-relevant tests per implementation
Made tests run against React 16.8 by default
* adding a react hooks test that fails with v7 alpha
* wrapping store.dispatch with rlt.act, fixes component renders
* reducing hooks test to 2 components
* Fix case where wrapper props changed before store update render
* Mark ReactDOM as global in UMD builds
Matches state as of v7.0.0-alpha.2
* Fix perf problems with out-of-bounds array access
Matches state as of v7.0.0-alpha.3
* Add modules to handle importing batchedUpdates
* Use appropriate batched update API for subscriptions
* Inject unstable_batchedUpdates in default entry point
* Provide an alternate entry point for alternate renderers
Matches state as of v7.0.0-alpha.4
* Remove batch arg from createListenerCollection (#1205)
This prevents a bug with Terser (webpack's default minifier) where the
returned batch function isn't defined due to function inlining.
Matches state as of v7.0.0-alpha.5
* Remove older React versions from Travis
* Add comments to connectAdvanced. Many much comments!
* Re-add test for a custom store as a prop
* Fix null pointer exception when store is given as a prop
We were trying to read contextValue.subscription, even if that
value was null. Reworked logic to handle cases where the store
came in as a prop.
* Ensure wrapper props are passed correctly when forwarding refs
* Add a test to verify subscription passthrough with store-as-prop
* add non-batched tests (#1208)
* Force SSR tests to mimic a Node environment
* Restructure connect tests to group by category for easier reading
Yeah, this kills the blame history. Sorry. But it's a lot easier
to figure out what the tests are used for now.
* Clean up dead code in Provider tests
* Add tests to verify errors are thrown for bad mapState functions
* Fix edge cases around saved wrapper props and error handling
Changed to useLayoutEffect to ensure that the lastWrapperProps ref
is written to synchronously when a render is committed. However,
because React warns about this in SSR, added a check to fall back
to plain useEffect under Node so we don't print warnings.
Also added logic to ensure that if an error is thrown during a
mapState function, but the component is unmounted before it can
render, that the error will still be thrown. This shouldn't happen
given our top-down subscriptions, but this will help surface the
problem in our tests if we ever break the top-down behavior.
* Formatting
* Add a test to verify no errors are printed in SSR usage
* Ignore .idea/
* 7.0.0-beta.0
* Updated outdated SSR-test (dispatch in ancestors) (#1213)
* Added test for injecting dynamic reducers on client and server (#1211)
* Remove WebStorm gitignore
This goes in a global gitignore file, not a project.
* [FIX]: #1219 Save references before update (#1220)
* Re-ignore .idea/
* 7.0.0-beta.1
* Update the codecov config to be more forgiving.
* add test to verify that mapStateToProps is always called with latest store state (#1215)1 parent eae14cc commit fa58572
File tree
25 files changed
+3595
-2352
lines changed- docs
- api
- introduction
- using-react-redux
- src
- components
- utils
- test
- components
- integration
- react/16.8
25 files changed
+3595
-2352
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | | - | |
13 | | - | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| 37 | + | |
| 38 | + | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
28 | 42 | | |
29 | 43 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 51 | + | |
| 52 | + | |
61 | 53 | | |
62 | 54 | | |
63 | 55 | | |
| |||
0 commit comments