Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For re-designed pages check if we can get rid of confirm object from redux state and always use hook to get it. #26414

Closed
jpuri opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template.

Comments

@jpuri
Copy link
Contributor

jpuri commented Aug 14, 2024

No description provided.

@jpuri jpuri self-assigned this Aug 14, 2024
@metamaskbot metamaskbot added the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label Aug 14, 2024
@jpuri
Copy link
Contributor Author

jpuri commented Aug 16, 2024

I checked the 2 scenario:

  1. Putting current confirmation in redux state
  2. Always re-calculating current confirmation from redux state

Current confirmation is queried at about 20 places in the code currently, this count will increase as we port more and more confirmations to new designs.

I found that there was a very small optimisation in using current confirmation from redux state, about 10-100 ms. But this makes case of continuing use of confirmation from redux state.

Another food for thought at this stage is - as we started on confirmation re-designs our initial thought was to put all state in redux - transient or persistent. We ended up introducing context also for transient state, using context for this transient state is a convenient pattern. Should we move current confirmation also to context ? Where should we prefer to keep transient UI state - redux vs context ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template.
Projects
None yet
Development

No branches or pull requests

3 participants