ionic-team / ionic-team/ionic-framework
feat: Expose the components making up the ionic react router or expose the internals for fine grained control
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 51
描述
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.
### Describe the Feature Request
Exposing the components would make, recreating the router with our own specific needs. ( Without just copy pasting out everything from the 2 libraries: ionic/react and ionic/react-router ).
Exposing everything that the router currently provides would also cover, i believe ,most of what we would expect a mobile navigation would be.
### Describe the Use Case
A mobile only app, could leverage the memory router instead of the browser router ( i just realized this is even an option, why is this not mentioned anywhere in the docs ), and have the fine grained control that is required to simulate the native navigation ( we all know that the browser router is NOT suitable at all for mobile navigation ). What i would need currently is a way to clear the navigation stack, and clear inbetween pages.
An example flow, a letter represent a page on the DOM / nav stack : A -> B -> C ; A -> B -> D; A -> B -> D -> E ->; A -> B -> D -> F;
After the first replace from C to D, A and B should be cleared from the stack, or at the end of the flow when E is replaced with F then clear the whole thing.
Another flow is just simply logging out, there can be a lot of pages still in the nav stack / on the DOM, that make absolutely no sense, and if you have a flow that uses a replace action but a page is still on the dom after logging out, navigation wil not happen or you can go back to pages and a likes.
### Describe Preferred Solution
_No response_
### Describe Alternatives
_No response_
### Related Code
_No response_
### Additional Information
_No response_
贡献指南
调研方向
Start by reviewing the router implementations in the ionic/react and ionic/react-router libraries, including how the memory router is documented and how navigation stacks are managed. Done would mean a defined way to expose the router components or internals and support the requested stack-clearing flows, but the issue provides no specific files, tests, or preferred API.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react, typescript
- 领域
- frontend, mobile
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100