react-native-tip icon indicating copy to clipboard operation
react-native-tip copied to clipboard

Typescript No overload matches this call.

Open SMKH-PRO opened this issue 1 year ago • 0 comments

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;

Screenshot 2023-08-26 at 1 20 36 AM

SMKH-PRO avatar Aug 25 '23 20:08 SMKH-PRO