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

Event driven reloads. #126

Closed
davissp14 opened this issue Sep 2, 2020 · 3 comments
Closed

Event driven reloads. #126

davissp14 opened this issue Sep 2, 2020 · 3 comments

Comments

@davissp14
Copy link

davissp14 commented Sep 2, 2020

So I am looking to achieve to what I can best describe as an "event driven reload".

Example Use-case:

A list of students is rendered on page load and a button is presented to the end-user that will allow them to refresh that list.

--

I do see that there's toggle functionality available, however, the event selector seems to gate-keep the initial render.

Is there currently any path for rendering on page load and leveraging events to trigger subsequent renders?

@davissp14
Copy link
Author

Related, or perhaps a duplicate request: #121

@nikolalsvk
Copy link
Owner

Hey, @davissp14, thanks for opening the issue.

Unfortunately, there's no way to render on page load when using the toggle feature. Adding this is the next thing I am going to work on.

You could get some ideas the controlled polling example. But I think it's best to wait for the new feature that will allow you to do so. If you have any ideas, PRs are appreciated.

@nikolalsvk
Copy link
Owner

Hey, @davissp14. I recently added a feature where you can dispatch an event with the name "refresh" on the render_async container. There is more information in the 2.1.8 release and docs here. Is this something you were looking for?

Let me know if it works for you. In the meantime, I will close the issue. Looking forward to your response, cheers 🍻

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