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

stakingFeeSat callback #259

Open
gbarkhatov opened this issue Jun 17, 2024 · 1 comment
Open

stakingFeeSat callback #259

gbarkhatov opened this issue Jun 17, 2024 · 1 comment
Assignees
Labels

Comments

@gbarkhatov
Copy link
Contributor

Currently stakingFeeSat is a memoized function.
@jrwbabylonchain suggested we have a callback function

@jrwbabylonchain please add the details of:

  • What it will improve
  • Your suggestion about the function
@jrwbabylonlab
Copy link
Collaborator

What it will improve

Avoid the react re-rending issue. as explained here #252 (comment)

I have put a console.log("rerended") inside the stakingFee.tsx. When i hit the button to adjust the fee. i have this log printed 8 times in total. so 8 re-render.
Imaging if we have a api call here, then this would be an issue.

Your suggestion about the function

Highlighted here with examples: #252 (comment)

@jrwbabylonlab jrwbabylonlab self-assigned this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants