-
Notifications
You must be signed in to change notification settings - Fork 17
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
An async widget example #42
Comments
I put together a quick example that may be what you're looking for. Here's an extension of the button example that automatically increments the button every second while you don't press anything. https://gist.github.com/drewolson/607c7e742c471400e0e61c5068e0728d Hope this helps. |
Yes, of course, I figured out how to do this much but the problem is:
And that happens in this example as well Actually, I ended up creating my own UI library based on researching your code and a couple of other UI libs and this code does exactly what I was asking about in the issue https://github.com/DoctorRyner/gimel/blob/master/examples/src/Main.purs But I'm in no position to develop and maintain my own library If I didn't express my thoughts clearly enough, the issue with https://gist.github.com/drewolson/607c7e742c471400e0e61c5068e0728d is that it interrupts incrementing counter's value if you click on buttons yourself |
@DoctorRyner This is a good point. I couldn't come up with a quick way to prevent the timer from getting reset on user input. I'll look into this more and will get back to you. I will keep this issue open until then. |
? |
This problem will be solved once Concur allows local state within components. We are going to track the lifecycle and local state implementation in an umbrella issue - #46. Closing this in favor of that issue. |
For instance, how to modify a counter example the way that it increments itself every second? I'm always ending up resetting time after clicking on inc and dec buttons
The text was updated successfully, but these errors were encountered: