-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript React: incorrect children props #193
Comments
@ChromeQ is there a way we can use your fork as a temporary solution? I've tried adding it to my packages with |
Based on this PR: #192 You can extend 'IDynamicModuleLoaderProps' interface in your *.d.ts (like in global.d.ts). Just add: declare module 'redux-dynamic-modules-react' {
export interface IDynamicModuleLoaderProps {
/** Explicitly name children as a prop to work with @types/react@18 */
children: React.ReactNode;
}
} |
Thanks @mrluscus ! I just want to add that in our case without importing Our solution was:
import * as reduxDynamicModulesReact from 'redux-dynamic-modules-react';
declare module 'redux-dynamic-modules-react' {
export interface IDynamicModuleLoaderProps {
children: React.ReactNode;
}
} |
#192 fixes TS errors since DefinitelyTyped updated react types to v18.
The text was updated successfully, but these errors were encountered: