pancake-frontend
pancake-frontend copied to clipboard
perf: Make history manager provider render only with subscribe
Historymanager provider and the hook only used in PageNetworkSupportModal therefore no need to re-render whole page when path changes if user is in correct chain
PR-Codex overview
This PR enhances the HistoryContext
by adding subscriber functionality to notify state changes.
Detailed summary
- Added
Subscriber
interface and related methods - Implemented subscriber pattern to notify state changes in
HistoryManagerProvider
- Updated
useHistory
hook to handle subscribers - Refactored
useHistoryManager
to include subscriber management
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}