You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.
provide a method by which to use derived data patterns with the safety of ember-concurrency tasks
provide a way to access the same invocation/value/data across components without each component having to compute that same data across each of those components.
ember-resources already provides a useTask and will soon (wip here) have a shared utility that will do this for us, with an api that may end up like:
importComponentfrom'@glimmer/component';import{useTask,shared}from'ember-resources';exportdefaultclassMyComponentextendsComponent{// reactive & derived ember-concurrency task// this could also just be _any_ resourcecompute=useTask(this, ...);// as long as only `data` is accessed (instead of `compute`), the value of `compute` will be shared among// all instances of MyComponent.//// this, like the current MemoizedTask, is still the same as instead defining this on a service // and accessing that service from the component,// except: you don't need to define a service.// data=shared(this,()=>this.compute);}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Question for maintainers: myself, @vitch @HeroicEric,
the purpose of this library was mainly to:
ember-resources already provides a
useTask
and will soon (wip here) have ashared
utility that will do this for us, with an api that may end up like:The text was updated successfully, but these errors were encountered: