TheWidlarzGroup / react-native-notificated

⚡️React Native toast notifications
https://thewidlarzgroup.github.io/react-native-notificated/
MIT License
387 stars 22 forks source link

[BUG] no children in the NotificationsProvider #251

Closed michalstruck closed 7 months ago

michalstruck commented 9 months ago

Prerequisites Please answer the following questions for yourself before submitting an issue.

Describe the bug NotificationsProvider does not work as specified in the docs, at the type level

To Reproduce TS 5.3.2

const Component = () => {
  const { NotificationsProvider } = createNotifications();

  return (
    <NotificationsProvider>
      <></>
    </NotificationsProvider>
  );
};

Possible Solution Adjust the type, it's specified as React.FC, since not so long ago it doesn't implicitly contain the children prop

PdoubleU commented 9 months ago

Hi @michalstruck, thanks for reporting this issue - I will investigate and address it. If you believe you can fix it yourself, please feel free to contribute :)