Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
根据作者 readme 的描述想法 , 我大致拆分了原 github1s.tsx 的组件内部结构:
event: 用于存放可能涉及到 content 页面里的一些逻辑方法
views:注入当前 url 页面的组件。
hooks:用于对应各自 views 的逻辑抽离。
register: 注册一些初始化 views 的方法。
后续增加不同页面的 组件的时候可以在views 里面新建,然后使用以上的不同层的逻辑。