We need a RootStore that stores all working instances.
RootStore should be able to:
[ ] Add an instance
[ ] Get an instance
[ ] Update an instance
[ ] Destroy an instance
[ ] Link related instances together (is Inversify involved here?)
[ ] Provide a public API as an alternative to hooks, primarily for non-React applications until we can provide first-class support for other frameworks
Let's keep local instantiations in mind. I should be able to create an instance on the fly, store it in the RootStore, perform a mutation that transports the data to the server and updates that same instance in response. Though already without thinking too much about it, this seems impossible as there's no identifier to connect the dots. Perhaps the solution there is just to move the data from the response, including the ID, into the local instance.
We need a
RootStore
that stores all working instances.RootStore
should be able to:Let's keep local instantiations in mind. I should be able to create an instance on the fly, store it in the
RootStore
, perform a mutation that transports the data to the server and updates that same instance in response. Though already without thinking too much about it, this seems impossible as there's no identifier to connect the dots. Perhaps the solution there is just to move the data from the response, including the ID, into the local instance.