-
Notifications
You must be signed in to change notification settings - Fork 16
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
localStorage should add every instance to the universal set #336
Comments
you probably just need to include the data/callbacks & data/callbacks-cache behaviors |
oh and localstorage-cache should be on a separate connection that is passed to the Todo.connection as the 'cacheConnection' property, e.g: https://canjs.com/doc/can-connect/data/localstorage-cache/localstorage-cache.html#Use |
@imaustink I assigned this to you to figure out if @nlundquist’s recommendations cover your needs, or if this is a bug that needs to be fixed. |
@chasenlehara I had a good talk with @nlundquist about this. As it stands, |
@justinbmeyer the problem is that the localstorage behavior currently can’t return lists that weren’t calculated by some backend and then cached in it - to work as a data source it will need to be able to calculate lists itself. The question is how that should be implemented. |
When trying to use
can-connect
as an interface for localStorage only, no HTTP calls,.getAll({})
results in{message: "no data", error: 404}
.This is the connection behavior I am using:
This branch contains my work-in-progress where I am using this behavior: https://github.com/canjs/todomvc/tree/update-canjs-example-to-3.x
cc: @justinbmeyer
The text was updated successfully, but these errors were encountered: