Open ghost opened 2 years ago
Yeah React is complaining about missing children prop after upgrading to >=17.
TS2769: No overload matches this call. Overload 1 of 2, '(props: ConnectedRouterProps<PoorMansUnknown> | Readonly<ConnectedRouterProps<PoorMansUnknown>>): ConnectedRouter<...>', gave the following error. Type '{ children: Element; history: History<PoorMansUnknown>; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ConnectedRouter<PoorMansUnknown>> & Readonly<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ConnectedRouter<PoorMansUnknown>> & Readonly<...>'. Overload 2 of 2, '(props: ConnectedRouterProps<PoorMansUnknown>, context: any): ConnectedRouter<PoorMansUnknown>', gave the following error. Type '{ children: Element; history: History<PoorMansUnknown>; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ConnectedRouter<PoorMansUnknown>> & Readonly<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ConnectedRouter<PoorMansUnknown>> & Readonly<...>'..
@kpavlov7 thanks for the idea to fix it temporarily with patch-package
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
connected-react-router@6.9.2
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.