online-status
online-status copied to clipboard
Add hooks to events
- [x] Add hook to
onlineevent - [x] Add hook to
offlineevent - [x] Add hook to both
onlineandofflineevent - [x] Add documentation
- [ ] Add typing
Not sure bringing a UI library in is a good idea, I would say these hooks should remain as small as possible to allow people consuming them to decide how they want to.
ie, if I'm not using evergreen, or don't like the look of these popups .. I can't really use this hook
thoughts @jamiebuilds @fouad ?
Yeah I agree I added that while developing. Need opinions on showing how to use the hooks On Fri, 26 Oct 2018 at 23.41 Jack Hanford [email protected] wrote:
@hanford requested changes on this pull request.
alternatively you could create a hook and open source it under your own name with this functionality.
I would say bringing in evergreen ui might be out of scope for these hooks
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rehooks/online-status/pull/6#pullrequestreview-168907688, or mute the thread https://github.com/notifications/unsubscribe-auth/ADkzMk6cuil2h4BgTN6kFlgpbbkaqiYiks5uoztLgaJpZM4X77yV .
Yeah, no need for UI, it's only going to make things more confusing
Definitely no UI 😛
Just re-read the messages. I think @hanford mistook me for adding a UI lib for the main bundle. I didn't, and just used the toaster from evergreen-ui in the example (yarn example). I agree if the example toaster component should be changed though. @fouad @jamiebuilds
Not sure bringing a UI library in is a good idea, I would say these hooks should remain as small as possible to allow people consuming them to decide how they want to.
ie, if I'm not using evergreen, or don't like the look of these popups .. I can't really use this hook
This is giving the users more flexibility so they can pass their own hooks to the offline and online events. The evergreen toasters are just an example
I've removed the ui dependency and opt for a console.log example. Would the ability to add custom callbacks to online and offline events be a good feature though? @hanford @fouad @jamiebuilds @jamesplease