pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

perf: Make history manager provider render only with subscribe

Open memoyil opened this issue 6 months ago • 2 comments

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}

memoyil avatar Aug 06 '24 09:08 memoyil