flutter_built_redux
flutter_built_redux copied to clipboard
Unsubscribe to state when not active route?
Hi!
I changed the formulation of the problem.
When navigating to a new page, the previous page in the router stack still subscribes to the state which results in unnecessary rebuilds which affect performance.
Is there a way to only subscribe to the state if it is the active one in the router stack?
@martinory can't you just use a Route Observer to do the unsubscribing?
https://master-api.flutter.dev/flutter/widgets/RouteObserver-class.html