Promise based HTTP client for the browser and node.js
It is easy to replace the native fetch with Axios. There's only need to remove the code that checks if the response is successful and parse the JSON response body because Axios does it internally.
🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
In complex web apps, making a lot of network requests, requiring advanced features like caching, it will probably be better to use React Query, a powerful React data synchronization library.
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
The useFetch hook could help us to simplify unit tests. In fact, we can spy on the hook and return a proper test double. Testing the component becomes easier because the hook spy hides the asynchronous behavior of fetch requests, serving directly the response. The stub let us reason about the component behavior and the test expectation without worrying about async execution. Assuming to use Jest and Testing Library, a unit test for the topics list component could be like the following.
Create ESM shared library
2 projects | dev.to | 12 Feb 2022
Mocking With Undici Like a Pro
2 projects | dev.to | 14 Jan 2022
Test Driven Development with React
3 projects | dev.to | 26 Dec 2021
Comprehensive coverage Jest+Playwright in Next.js TS
7 projects | dev.to | 29 Jun 2022
Angular CLI and Nx - Why?
1 project | dev.to | 22 Jun 2022