react-notification-system icon indicating copy to clipboard operation
react-notification-system copied to clipboard

Added render props

Open dyst5422 opened this issue 7 years ago • 5 comments

Allowing for render props. This should simplify a lot of the issues people have using refs.

Example usage:

<NotificationSystem>
  {({ addNotification }) => (
    <button onClick={() => addNotification({ message: 'New notification' })}>Add Notification</button>
  )}
</NotificationSystem>

dyst5422 avatar Mar 22 '18 20:03 dyst5422

Coverage Status

Coverage decreased (-79.04%) to 16.544% when pulling ef745789e3f48318a96eb4ee23dffba172b81bbe on dyst5422:master into e2c4a140ab2fede650e23a7b6fa1a7ebebbfa337 on igorprado:master.

coveralls avatar Mar 22 '18 20:03 coveralls

Very confused as to why the coverage went down. I just added a single test for the render props and changed nothing else

dyst5422 avatar Mar 22 '18 20:03 dyst5422

@igorprado Can I get some feedback on making this one happen?

dyst5422 avatar Apr 19 '18 17:04 dyst5422

@dyst5422 Will get back to you.

syndbg avatar Jun 18 '18 16:06 syndbg

Any update on this one?

dyst5422 avatar Jul 31 '18 16:07 dyst5422