react-router-dom v5 error

введите сюда описание изображения

введите сюда описание изображения

No overload matches this call. Overload 1 of 2, '(props: BrowserRouterProps | Readonly): BrowserRouter', gave the following error. Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'. Overload 2 of 2, '(props: BrowserRouterProps, context: any): BrowserRouter', gave the following error. Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.

No overload matches this call. Overload 1 of 2, '(props: (RouteProps<"/", {}> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string | undefined; }>>) | Readonly<RouteProps<"/", {}> & OmitNative<...>>): Route<...>', gave the following error. Type 'Element' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType | undefined'. Overload 2 of 2, '(props: RouteProps<"/", {}> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string | undefined; }>>, context: any): Route<{}, "/">', gave the following error. Type 'Element' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType | undefined'.

Не понимаю что не так, подскажите как решить эту проблему


Ответы (0 шт):