Conversation
commit: |
|
@neurosnap I added an effection |
|
Would you consider this advanced usage? |
|
Hmm at the current time I might? You could, for example, grab the |
|
I added it as a section under the guides for now unless you have a better idea, @neurosnap. |
| }); | ||
| } | ||
|
|
||
| function manage<Resource>(name: string, inputResource: Operation<Resource>) { |
There was a problem hiding this comment.
Hmm, help me understand why this should live within our store which mostly deals with our single global object. If I were designing this API I would probably keep it at the thunk level. Is the problem that we need to share the same instance of an object across all thunks?
There was a problem hiding this comment.
That would be the specific use case, yes. So you could opt to "share" it at a specific thunk level via thunk.manage or make it "globally" available at store.manage. We effectively have these two "levels" where we could establish context, and it feels useful to enable at both.
|
It is not immediately clear why |
Motivation
Pulled out the
.manage()API from #67. We could still iterate on #67 a bit, but theresourcehandling is likely ready to move forward.