@rmmmp wrote:
So I’ve been experimenting lately with state management in Ember. I’m looking to see if the idea has any flaws before I invest more time in it.
Basically, the addon is inspired from Ember Data and Redux. The idea is to have an immutable model-based state in which your Routes can subscribe to for changes. When a state changes, all subscribed Routes will call their
refresh()
function. Because states are immutable, the Route will pass-in a newmodel
to its Controller effectively rerendering the view.Here’s my WIP addon.
My concern is with the
refresh()
as it can do so little and at the same time do so many things depending on the app. I’m wondering if there’s any edge case to look out for. So far I could only think of that it should resolve to the cached records when therefresh()
has been called.So, does anyone have any idea on why this idea wouldn’t work?
Posts: 1
Participants: 1