Skip to content

Commit 87c5621

Browse files
authored
test: Adjust type tests to be compatible with React 18 typings (#1868)
1 parent 422c869 commit 87c5621

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

test/typetests/react-redux-types.typetest.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ class App extends Component<any, any> {
9999

100100
const targetEl = document.getElementById('root')
101101

102-
ReactDOM.render(<Provider store={store}>{() => <App />}</Provider>, targetEl)
102+
ReactDOM.render(
103+
<Provider store={store}>
104+
<App />
105+
</Provider>,
106+
targetEl
107+
)
103108

104109
declare var store: Store<TodoState>
105110
class MyRootComponent extends Component<any, any> {}
@@ -125,7 +130,9 @@ declare var todoActionCreators: { [type: string]: (...args: any[]) => any }
125130
declare var counterActionCreators: { [type: string]: (...args: any[]) => any }
126131

127132
ReactDOM.render(
128-
<Provider store={store}>{() => <MyRootComponent />}</Provider>,
133+
<Provider store={store}>
134+
<MyRootComponent />
135+
</Provider>,
129136
document.body
130137
)
131138

yarn.lock

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,18 +2616,7 @@ __metadata:
26162616
languageName: node
26172617
linkType: hard
26182618

2619-
"@types/react@npm:*":
2620-
version: 17.0.19
2621-
resolution: "@types/react@npm:17.0.19"
2622-
dependencies:
2623-
"@types/prop-types": "*"
2624-
"@types/scheduler": "*"
2625-
csstype: ^3.0.2
2626-
checksum: 369578687b39d66fafcb2e41b9e12a0aa0dda8db5661b68d4c9bd7679d3da96515c69905b1a882f2da01988104dca30d400811e1488ed146ac98d246e8e67695
2627-
languageName: node
2628-
linkType: hard
2629-
2630-
"@types/react@npm:^17.0.35":
2619+
"@types/react@npm:*, @types/react@npm:^17.0.35":
26312620
version: 17.0.35
26322621
resolution: "@types/react@npm:17.0.35"
26332622
dependencies:

0 commit comments

Comments
 (0)