The data of auctioningToken and biddingToken is needed in many many components. All of them use the useAuctionDetails hooks.
Hence, the api call from within the hooks is triggered very often(over 11 times per site load), as the disjoint components all load it themselves.
I see to ways to fix it:
load the auctionDetails in a higher component and then pass it down to the other components
2.load the aucttionDetails into the app state and let all components pull the information from the app state.
Probably 1. is cleaner, but also more work to refactor.
What are your opinions @mariano-aguero and others?
The data of
auctioningToken
andbiddingToken
is needed in many many components. All of them use theuseAuctionDetails
hooks. Hence, the api call from within the hooks is triggered very often(over 11 times per site load), as the disjoint components all load it themselves.I see to ways to fix it:
Probably 1. is cleaner, but also more work to refactor. What are your opinions @mariano-aguero and others?