@types/react 18.0.0 not compatible with Easy Peasy
See original GitHub issueI am getting a Typescript error if I upgrade @types/react to version 18.0.0 and use Easy Peasy:
Type error: No overload matches this call.
Overload 1 of 2, '(props: { store: Store<StoreModel, EasyPeasyConfig<undefined, {}>>; } | Readonly<{ store: Store<StoreModel, EasyPeasyConfig<undefined, {}>>; }>): StoreProvider<...>', gave the following error.
Overload 2 of 2, '(props: { store: Store<StoreModel, EasyPeasyConfig<undefined, {}>>; }, context: any): StoreProvider<StoreModel>', gave the following error.
<StoreProvider store={store}>
<Component {...pageProps} />
</StoreProvider>
Issue Analytics
- State:
- Created a year ago
- Reactions:14
- Comments:8 (4 by maintainers)
Top Results From Across the Web
@types/react - npm
Start using @types/react in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type declarations.
Read more >Upgrading @types/react to 18.0.0 gives no overload matches ...
In my code I just want to use a generic type MyProps and my function accepts a parameter of ComponentClass. This started throwing...
Read more >React 18 is not compatible with Fluent UI and how to work ...
The reason in both cases for the error is that once React 18 is installed, Fluent UI will not install since it requires...
Read more >npm eresolve could not resolve - You.com | The AI Search ...
The error is telling you that react-scripts@4.0.0 supports typescript@^3.2.1 (i.e. TypeScript >=3.2.1, <4) as a peer dependency. Your dev dependencies have ...
Read more >Upgrading to new versions - React Native
I want to upgrade with React Native CLI but I don't use Git. While your project does not have to be handled by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I believe the more correct way to augment the type is to do the following:
This will keep all the strong typing and add the children prop back to the type.
Here is an example of how to temporarily workaround this issue until the fix is published: