#Fetch
3 notas · última:
Replace axios with a simple custom fetch wrapper
The page argues that, in the browser, a small custom wrapper around fetch can replace axios for most needs while keeping the API simpler, smaller, and easier to maintain.
Stop mocking fetch
The article argues that mocking clients or fetch in tests lowers confidence and adds setup noise. It recommends using MSW to keep tests close to real requests while sharing handlers across tests and development.
Build your own Dev.to API client in Node.js
The post explains why API clients help centralize authentication, speed development, and normalize error handling, then builds a small Dev.to wrapper in Node.js with fetch, query strings, and basic CRUD methods.
