This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Refactor "My Trades" and "All Trades" to use react-query instead of redux #513
Comments
evgenyboxer
changed the title
Refactor "My Trades" and "All Trades" to use react-query instead of sagas.
Refactor "My Trades" and "All Trades" to use react-query instead of redux.
Aug 25, 2020
evgenyboxer
changed the title
Refactor "My Trades" and "All Trades" to use react-query instead of redux.
Refactor "My Trades" and "All Trades" to use react-query instead of redux
Aug 25, 2020
I'm planning on PRing
I assume this logic should move into the second hook/component now right based off the
I'm not sure how to type |
jwineman
pushed a commit
that referenced
this issue
Sep 10, 2020
refactor: #513 migrate <AllTrades/> to react-query.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We are in the process of moving data fetching to use
react-query
instead of handling it in redux (via sagas).Please checkout the docs for it - https://github.com/tannerlinsley/react-query
If you are new to sagas, its basically a way to handle side effects in redux, similarly to what
redux-thunk
gives us (but way more robust). Our use of sagas is fairly simple, so migrating it toreact-query
is trivial.Currently, both "My Trades" and "All Trades" use sagas whereas the recently added "Options Trade" view is using
react-query
. Its a great reference on how to use it in our codebase.The trade view located here - https://synthetix.exchange/#/trade/sBTC-sUSD (under the chart/order card).
You need to be logged in to view "My Trades".
Options trade view - https://synthetix.exchange/#/options/0xa59a361e670ca290b5821bbc7b83fe0ed14791d2 (under chart/order card). In the "Recent/Your" activity tabs.
The PR should be on the
dev
branch.Let us know if you got any questions!
The text was updated successfully, but these errors were encountered: