Closed FrigoEU closed 8 years ago
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:
https://github.com/zrho/purescript-optic-ui/pull/13 Commit Summary
- Added driver
- Improved driver function
File Changes
- M src/OpticUI/Run.purs https://github.com/zrho/purescript-optic-ui/pull/13/files#diff-0 (12)
Patch Links:
- https://github.com/zrho/purescript-optic-ui/pull/13.patch
- https://github.com/zrho/purescript-optic-ui/pull/13.diff
— Reply to this email directly or view it on GitHub https://github.com/zrho/purescript-optic-ui/pull/13.
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.
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