react-native-tip
react-native-tip copied to clipboard
Typescript No overload matches this call.
Error:
No overload matches this call.
Overload 1 of 2, '(props: ITipProvider | Readonly<ITipProvider>): TipProvider', gave the following error.
Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<TipProvider> & Readonly<ITipProvider>'.
Overload 2 of 2, '(props: ITipProvider, context: any): TipProvider', gave the following error.
Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<TipProvider> & Readonly<ITipProvider>'.
My Code:
import React from "react";
import { PersistGate } from "redux-persist/integration/react";
import { Provider } from "react-redux";
import TipProvider from "react-native-tip";
import { store, persistor } from "./src/redux";
type Props = {
children: JSX.Element;
};
const Providers = ({ children }: Props) => (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<TipProvider>
{children}
</TipProvider>
</PersistGate>
</Provider>
);
export default Providers;