Senior Frontend Engineer & Architect
Frontend architecture, optimizations & dev experience
Building libraries, DeFi UIs, consulting
Working at @eulerfinance
Poor frontend architecture quietly burns money in DeFi.
More hooks → more RPC calls → more complexity → more maintenance time.
I wrote about structuring data flow so code, performance, and costs stay predictable.
New post 👇
Working on new UX for your swaps in @eulerfinance forms, inspiration taken from world's leading DEX-es, you will soon be able to pick quotes yourself!
Work in progress:
@0xSkas@eulerfinance - you still probably need mapper or complex selector in each of these queries to do something meaningful
BTW I got couple of great questions, I will probably create blog series to explain all of them.. x doesn't allow long comments..
@0xSkas@eulerfinance Key differences:
- You still cannot await for something before calling useQueries
- Calculating something after everything is done is already complex and heavy (you have to figure out is every done done)
Example: you are fetching balances and displaying $ value sum
@0xSkas@eulerfinance Great question! I do,
useQueries is good if you want to render something as soon as its ready and not wait for all results, but in each of this query you might still want to call a mapper.
@yulafezmem@eulerfinance I see what you mean, but selectors cannot be async nor reused. That would be a key difference between my mapper..
Take a look at displayBalanceMapper in my blog that I've shared in previous comment
@yulafezmem@eulerfinance There are many solution to the problem for sure, personally i would prefer non react way for data fetching, and try to split responsibilities more. Take a look in this post for more understanding: https://t.co/vxASybc36z