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

Signal based change detection #941

Closed
JulienLecoq opened this issue Mar 18, 2024 · 2 comments
Closed

Signal based change detection #941

JulienLecoq opened this issue Mar 18, 2024 · 2 comments

Comments

@JulienLecoq
Copy link

Are there any plans to support signal-based change detection, given the current trend? Modern front-end frameworks are increasingly adopting signal-based change detection. This mechanism automatically updates the UI when certain variables change, eliminating the need to manually update the UI by calling an 'update()' function.

@oderwat
Copy link
Sponsor Contributor

oderwat commented Mar 19, 2024

I kind of wonder about your inquiry as there are no manual updates in Go-App (for the most part) for the developer.

The term "signals" seems a bit ambiguous as my first idea when it comes to "signals" is about state changes and component interactions like https://go-app.dev/states, which is part of Go-App already.

I saw "signals" mentioned for AngularJS where the signaling idea tries to avoid patching the browser engine for all the places where updates could appear (and check for all possible effects). But Go-App is not a JS Framework and works not like that at all.

In Go-App there is no browser patching at all and all changes to the DOM are controlled by the UI routine and happen on the Go language level. I do think that there could be optimizations there, but in a totally different way. As I understand it, Go-App is basically a loop-driven (Immediate Mode) model, that has optimizations to not re-render everything and even if it renders it, it is often not updating the DOM or does it quite efficient.

I may be ignorant about the JS world (and for a reason). May I ask what your idea is on what level can Go-App utilize the "thing" you are talking about?

@maxence-charriere
Copy link
Owner

@oderwat said it all.

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

No branches or pull requests

3 participants