sargassum-world / latreutes

Desktop application for connecting to ZeroTier networks
Apache License 2.0
1 stars 1 forks source link

Improve handling of server state #9

Closed ethanjli closed 3 years ago

ethanjli commented 3 years ago

The approach for issuing HTTP requests and processing responses through Tauri's API in c1f6f676e3fe4308e936e1223527fe51f388c081 is a bit crude. For example, repeatedly issuing GET requests to the ZeroTier One service is hacked together with useEffect, and not in a robust way. We need a cleaner way of doing these requests.

ethanjli commented 3 years ago

One option could be to use Redux Toolkit; however, it might not be the best tool for the job. We could also consider SWR (which looks like a good fit for repeatedly fetching data with GET requests) or React Query (which might be what we should use)