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

Return "driver" function from animate #13

Merged
merged 2 commits into from
Nov 18, 2015
Merged

Return "driver" function from animate #13

merged 2 commits into from
Nov 18, 2015

Conversation

FrigoEU
Copy link
Contributor

@FrigoEU FrigoEU commented Nov 17, 2015

Hey,

Similar to Halogen's driver function, I added a function that gets returned when calling animate. To this function you can pass another function (s -> s) so you can change the state from the outside. I needed this to change some state when the browser's hash changes, but it can be used in some other ways also: timers, websockets, etc.

Simon

@zrho
Copy link
Owner

zrho commented Nov 18, 2015

That sounds useful! I'll have a look on all the proposed changes on
Thursday once I've finished work for this week. I'm really glad to how much
you all want to see this move forward!
Am 18.11.2015 00:26 schrieb "Simon Van Casteren" notifications@github.com:

Hey,

Similar to Halogen's driver function, I added a function that gets
returned when calling animate. To this function you can pass another
function (s -> s) so you can change the state from the outside. I needed
this to change some state when the browser's hash changes, but it can be
used in some other ways also: timers, websockets, etc.

Simon

You can view, comment on, or merge this pull request online at:

#13
Commit Summary

  • Added driver
  • Improved driver function

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#13.

@zrho
Copy link
Owner

zrho commented Nov 18, 2015

This circumvents the generation check, but that should be fine, I think, since the driver is only generated once in the beginning and does not include any reference to the state.

zrho added a commit that referenced this pull request Nov 18, 2015
Return "driver" function from animate
@zrho zrho merged commit 20c8d7b into zrho:master Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants