Open henry-hz opened 4 years ago
there is a ShouldUpdate<T> shouldUpdate,
parameter of page/component which let you to define your view rebuild timing.
@DDDrop thanks for dedicating your time to reply me ! Do you think the same strategy would fit for a stream subscription (like the one with make with graphql) ? See that it's possible to use a Flutter lib or a pure Dart option in this examples.
@henry-hz I think they are different things. shouldUpdate
is for how to update(rebuild) view, and stream subscription is like when to update state.
Is your feature request related to a problem? Please describe. I'm always frustrated when rendering the view widget after an async call see this example code,
I am also using this strategy for this moment, of having a reducer to manage the loading state....
Describe the solution you'd like I would like a mechanism to trigger render that listen a state variable if its not null and render the view, without creating the reducer/action/state for an 'onloading' . In the example below, we should think about the 'future' function that will trigger the snapshot state... I have no clue on how to use it with fish-redux.... in fact, maybe it's only a question of adding how to do it into the docs... or implementing it :)
Describe alternatives you've considered Considered using the FutureBuilder, but it didn't work when 'listening the state'
Thanks for the amazing lib !