Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Suggestion to refactor to use graphql-request and swr for graphql #25

Open
mirshko opened this issue Mar 23, 2020 · 0 comments
Open

Suggestion to refactor to use graphql-request and swr for graphql #25

mirshko opened this issue Mar 23, 2020 · 0 comments

Comments

@mirshko
Copy link

mirshko commented Mar 23, 2020

https://github.com/Uniswap/uniswap-org/blob/bfa2f0a0a6769385a6e577ab7eeeb3c2f6d29983/src/components/ticker.js#L5

heya!

noticed you're using Apollo here for the ticker, that's a MASSIVE dep to have just to fetch data from a graphql api. Unless you plan to use it more on the org website I suggest to rework to use https://www.github.com/prisma/graphql-request and maybe https://github.com/zeit/swr for fetching new data polling.

it should shave a good amount of the bundle and speed is where its at these days!

lemme know you want some help!

and then you don't need to wrap anything or use hocs for the data fetching either!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant