-
Notifications
You must be signed in to change notification settings - Fork 178
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
Store is triggered when render is called #256
Comments
In general storage-sent data updates after rendering are a little problematic currently: if you were interacting with the app, especially editing data, you could lose a lot of state. Mavo does try to minimize this a bit, by re-rendering on existing elements whenever possible, and only if values have changed, but that doesn't work very well with collections, if items have been added in the middle of the collection. Could you elaborate on what you mean by "an unnecessary update"? What kind of update? Also, are you using a custom firebase backend or https://github.com/lizziew/mavo-firebase ? |
For my use case it's fine to lose edits. I forgot to mention that the "unnecessary update" happens when The mavo-firebase plugin didn't meet my needs so I'm working on my own. |
This is a hack, but off the top of my head: Store the value of Eventually, this should be fixed in Mavo. I think it's a bug that calling
The mavo-firebase plugin is very much a work in progress, @lizziew plans to develop it much further, and I am (loosely) supervising her work. One thing I’m really excited about is adding granular permissions, so that users can have different permissions per Mavo node, since Firebase supports that kind of granularity. Another thing is server-sent updates. Are you sure you don't want to collaborate on making it better instead of making a new one? |
I tried the hack, but for some reason it still always called
No, I don't see a reason why
Great to hear of the future plans! The project looked abandoned. At this moment I will however continue on my own path, but I don't see a reason why they couldn't be merged at a later point. @lizziew: give me a shout when you are planning to continue working on it, and I will rethink my stance. |
Hmmm, odd. In any case, your solution is actually better.
Ok, I will mark this as a bug then!
@lizziew is a CS major at MIT, I believe she's doing an internship this summer, which is why she is not currently working on it. She will pick it up again in September. Do you plan to publish yours @valterkraemer or is it only for internal use? |
Cool.
Planning to publish everything under MIT licence. |
I cannot reproduce this anymore, so I'm closing this. If that's in error, feel free to reopen! |
I modified the localstorage backend to update Mavo when there is an change in localstorage (f92378d) so that windows/tabs are kept in sync.
This however triggers an unnecessary update. It works fine for localstorage, but for my firebase backend it causes problems.
Or is there a better way of pushing data from backend?
The text was updated successfully, but these errors were encountered: