Skip to content

Commit

Permalink
test: Adjust type tests to be compatible with React 18 typings
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 31, 2022
1 parent 183162d commit 4be21cd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/typetests/react-redux-types.typetest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ class App extends Component<any, any> {

const targetEl = document.getElementById('root')

ReactDOM.render(<Provider store={store}>{() => <App />}</Provider>, targetEl)
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
targetEl
)

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

ReactDOM.render(
<Provider store={store}>{() => <MyRootComponent />}</Provider>,
<Provider store={store}>
<MyRootComponent />
</Provider>,
document.body
)

Expand Down

0 comments on commit 4be21cd

Please sign in to comment.