Open sohrab- opened 1 year ago
Made some refactoring to avoid some re-renders:
There is definitely more work to be done here. We need to investigate the re-renders using react devtools profiler.
Fixed an issue with Solana's Connection
class causing re-renders: https://github.com/labeleven-dev/bettercallsol/commit/639d6f06fbf082103476b754defca97d42a3882f
What happened?
Some components, e.g. export modal or send/simulate button, need the whole transaction so they are reloaded every time any part of the transaction changes. In reality, these components only need the entire transaction as a callback, e.g. when the export modal is opened or when send/simulate button is pressed.
Is there a way to lazily load the transaction from the state store only on those callbacks?
Errors & Logs
No response
App Version
v1.0.0-alpha.57 (101-1)
Web Browser
Brave v1.46.144 (Dec 14, 2022)