Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

What would be the right way of using a scan operator? #44

Open
GDX64 opened this issue Jul 16, 2023 · 2 comments
Open

What would be the right way of using a scan operator? #44

GDX64 opened this issue Jul 16, 2023 · 2 comments

Comments

@GDX64
Copy link

GDX64 commented Jul 16, 2023

If the history of changes is important, how can I use it to derive the new values? The closest I saw of an accumulator was map_mut, but it loses values in between if I don't poll for changes.

@lord
Copy link
Owner

lord commented Jul 26, 2023

i think this library's architecture fundamentally doesn't work if you care about the history of values. see https://blog.janestreet.com/breaking-down-frp/

@GDX64
Copy link
Author

GDX64 commented Jul 27, 2023

I've read it before, I've seen it on the readme of the repo :) . Is it possible to mutate the value of the signal with a function? Kind of like what leptos does.

fn with<F: FnOnce(&mut T)>(&mut self, f: F)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants