Skip to content
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

Support for TypeScript #95

Open
andrefangeloni opened this issue Jul 4, 2022 · 2 comments
Open

Support for TypeScript #95

andrefangeloni opened this issue Jul 4, 2022 · 2 comments

Comments

@andrefangeloni
Copy link

Hi there,
I'm already installed this lib on my project with TS and I'm facing this error below:

Type '{ children: Element[]; position: "BOTTOM"; }' is not assignable to type 'IntrinsicAttributes & Omit<ToastContextType, "toast">'.
Property 'children' does not exist on type 'IntrinsicAttributes & Omit<ToastContextType, "toast">'.

Follow my code:

import React from 'react';
import { Provider } from 'react-redux';
import { StatusBar } from 'react-native';
import { ToastProvider } from 'react-native-styled-toast';

import { Routes } from './routes/routes';

import store from './redux';

const App = () => (
  <Provider store={store}>
    <ToastProvider position="BOTTOM">
      <StatusBar backgroundColor="#000" />
      <Routes />
    </ToastProvider>
  </Provider>
);

export default App;

Thanks

@w1ll-dev
Copy link

same here

@andrefangeloni
Copy link
Author

@mbukeRepo The problem is on ToastProvider don't expect to receive children by props. It seems no one is maintaining the lib =/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants