slovnicki / beamer

A routing package built on top of Router and Navigator's pages API, supporting arbitrary nested navigation, guards and more.
MIT License
582 stars 128 forks source link

Tab Control #618

Open slovnicki opened 1 year ago

slovnicki commented 1 year ago

This is a work in progress proposal and will be updated with implementation details

For more details about where this is coming from, visit v2 Roadmap Discussion or v2 Roadmap Wiki.
This issue might get separated into multiple issues when implementation details become clearer;

Motivation

When we "navigate" through tabs within the application, this is not handled by Navigator, but is a navigation event from user's perspective. Currently, to connect parent Beamer with tabs, most often when we have child Beamers within each tab, we would define a listener in both ways and call setState() / Beamer.update(..., rebuild: false). We will try to connect the tab control with Beamer internally which should provide a better developer experience and remove the need for questioning "Am I doing this the right way?".

Furthermore, if we connect all "navigation events" with Beamer, then dealing with history and back buttons becomes trivial, hopefully.