Will's avatar

Posts and notes Webapi

(2 items)

React Query 15 December 2020

If you write React web apps that interface with a backend web API then definitely consider trying React Query.

The library makes use of modern React patterns, such as hooks, to keep code concise and readable. It probably means you can keep API calls directly inside your normal component code rather than setting-up your own client-side API interface modules.

React Query will also cache resolved data through unique “query keys”, so you can keep transitions in UIs fast with cached data without needing to rely on redux.

Read more...(1 minute read)

Developing Useful APIs for the Web 5 February 2015

Yesterday, I gave a talk about my experiences with developing and using RESTful APIs, with the goal of providing tips for structuring such interfaces so that they work in a useful and sensible way.

I went back to first principles, with overviews of basic HTTP messages as part of the request-response cycle and using sensible status codes in HTTP responses. I discussed the benefits of ‘collection-oriented’ endpoint URLs to identify resources that can be accessed and modified and the use of HTTP methods to describe what to do with these resources.

Read more...(1 minute read)