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

Events subscription api #240

Closed
3 tasks
btzr-io opened this issue Dec 1, 2019 · 4 comments
Closed
3 tasks

Events subscription api #240

btzr-io opened this issue Dec 1, 2019 · 4 comments

Comments

@btzr-io
Copy link
Owner

btzr-io commented Dec 1, 2019

Provide a subscription api for events:

  • Trigger event on error
  • Trigger event when page load / change.
  • More ? ...
@DaniAcu
Copy link
Contributor

DaniAcu commented Dec 28, 2019

QQ: When you trigger an error you expect that the component shows some alert or something. Because if we have some error I suppose that the component could be work wrong. So maybe it's a good idea to put a message to say to the user that report that fails if he wants as an issue on the repo. But it's only an idea. In any case, what's the status that you expect when the component when that fails and an error happened?

@btzr-io
Copy link
Owner Author

btzr-io commented Dec 28, 2019

Actually there is a component for that:
https://github.com/btzr-io/Villain/blob/master/packages/villain-react/src/components/renderError.js

I like the idea of adding a link or button to report the issue 👍

@btzr-io
Copy link
Owner Author

btzr-io commented Dec 28, 2019

This api will be used when developers need to do something when a certain event occurs, like showing a custom error view.

@btzr-io
Copy link
Owner Author

btzr-io commented Apr 26, 2020

I'll merge this issue with: #446,
We should handle this with react hooks.

@btzr-io btzr-io closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants