Skip to content

Commit f101623

Browse files
authored
Merge pull request #1808 from reduxjs/feature/react-18-initial-compat
2 parents 9021feb + 7c2b73f commit f101623

21 files changed

+13097
-7542
lines changed

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ coverage
55
es
66
temp/
77
react-redux-*/
8+
.vscode/
89

9-
.cache
10+
.cache/
11+
.yarn/cache/
12+
website/.yarn/
1013
.yarnrc
1114
.yarn/*
1215
!.yarn/patches
@@ -26,6 +29,5 @@ lib/core/MetadataBlog.js
2629

2730
website/translated_docs
2831
website/build/
29-
website/yarn.lock
3032
website/node_modules
3133
website/i18n/*

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
base = "website"
33
publish = "website/build"
4-
command = "yarn build && cp _redirects ./build"
4+
command = "yarn && yarn build && cp _redirects ./build"
55
ignore = "git diff --quiet HEAD^ HEAD -- ../docs/ ."
66

77
[build.environment]

package.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux",
3-
"version": "7.2.4",
3+
"version": "8.0.0-alpha.0",
44
"description": "Official React bindings for Redux",
55
"keywords": [
66
"react",
@@ -39,11 +39,8 @@
3939
"type-tests": "yarn tsc -p test/typetests",
4040
"coverage": "codecov"
4141
},
42-
"workspaces": [
43-
"website"
44-
],
4542
"peerDependencies": {
46-
"react": "^16.8.3 || ^17"
43+
"react": "^16.8.3 || ^17 || ^18"
4744
},
4845
"peerDependenciesMeta": {
4946
"react-dom": {
@@ -55,10 +52,13 @@
5552
},
5653
"dependencies": {
5754
"@babel/runtime": "^7.12.1",
55+
"@types/hoist-non-react-statics": "^3.3.1",
56+
"@types/use-sync-external-store": "^0.0.0",
5857
"hoist-non-react-statics": "^3.3.2",
5958
"loose-envify": "^1.4.0",
6059
"prop-types": "^15.7.2",
61-
"react-is": "^16.13.1"
60+
"react-is": "^16.13.1",
61+
"use-sync-external-store": "0.0.0-experimental-7d38e4fd8-20210930"
6262
},
6363
"devDependencies": {
6464
"@babel/cli": "^7.12.1",
@@ -71,18 +71,19 @@
7171
"@babel/preset-env": "^7.12.1",
7272
"@babel/preset-typescript": "^7.14.5",
7373
"@microsoft/api-extractor": "^7.18.1",
74+
"@reduxjs/toolkit": "^1.6.1",
7475
"@rollup/plugin-babel": "^5.2.1",
7576
"@rollup/plugin-commonjs": "^15.1.0",
7677
"@rollup/plugin-node-resolve": "^9.0.0",
7778
"@rollup/plugin-replace": "^2.3.3",
7879
"@testing-library/jest-dom": "^5.11.5",
7980
"@testing-library/jest-native": "^3.4.3",
80-
"@testing-library/react": "^12.0.0",
81+
"@testing-library/react": "https://pkg.csb.dev/testing-library/react-testing-library/commit/0e2cf7da/@testing-library/react#.tgz",
8182
"@testing-library/react-hooks": "^3.4.2",
8283
"@testing-library/react-native": "^7.1.0",
8384
"@types/create-react-class": "^15.6.3",
8485
"@types/object-assign": "^4.0.30",
85-
"@types/react": "^17.0.14",
86+
"@types/react": "17.0.19",
8687
"@types/react-dom": "^17.0.9",
8788
"@types/react-is": "^17.0.1",
8889
"@types/react-native": "^0.64.12",
@@ -103,10 +104,10 @@
103104
"glob": "^7.1.6",
104105
"jest": "^26.6.1",
105106
"prettier": "^2.1.2",
106-
"react": "^16.14.0",
107-
"react-dom": "^16.14.0",
107+
"react": "0.0.0-experimental-7d38e4fd8-20210930",
108+
"react-dom": "0.0.0-experimental-7d38e4fd8-20210930",
108109
"react-native": "^0.64.1",
109-
"react-test-renderer": "^16.14.0",
110+
"react-test-renderer": "0.0.0-experimental-7d38e4fd8-20210930",
110111
"redux": "^4.0.5",
111112
"rimraf": "^3.0.2",
112113
"rollup": "^2.32.1",

src/components/Context.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import React from 'react'
22
import { Action, AnyAction, Store } from 'redux'
3-
import type { FixTypeLater } from '../types'
43
import type { Subscription } from '../utils/Subscription'
54

65
export interface ReactReduxContextValue<
7-
SS = FixTypeLater,
6+
SS = any,
87
A extends Action = AnyAction
98
> {
109
store: Store<SS, A>
1110
subscription: Subscription
1211
}
1312

1413
export const ReactReduxContext =
15-
/*#__PURE__*/ React.createContext<ReactReduxContextValue | null>(null)
14+
/*#__PURE__*/ React.createContext<ReactReduxContextValue>(null as any)
1615

1716
export type ReactReduxContextInstance = typeof ReactReduxContext
1817

src/components/Provider.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface ProviderProps<A extends Action = AnyAction> {
1515
* If this is used, you'll need to customize `connect` by supplying the same context provided to the Provider.
1616
* Initial value doesn't matter, as it is overwritten with the internal state of Provider.
1717
*/
18-
context?: Context<ReactReduxContextValue | null>
18+
context?: Context<ReactReduxContextValue>
1919
children: ReactNode
2020
}
2121

0 commit comments

Comments
 (0)