Here’s an example app which uses React Query to add the superpowers of caching, debouncing, and automatic cancellation/retries to a simple fetch-based React app. The source is available here – it’s all TypeScript and includes some E2E tests.
Tag Archives: source code
Chat app in React (hooks)
Here’s a simple chat app I created as an example of using (hooks flavoured) React with Firebase, all in TypeScript. It’s a little like the YouTube superchat thing, whereby everyone can log in with single click Google authentication and all chat to each other.
Continue reading Chat app in React (hooks)Optimal scrolling for 2D games or UIs
I recently stumbled upon an old bit of code which demonstrates a technique I created for an efficient scrolling data grid on the YouView TV platform. I call it ‘Blit Scrolling’. Below is a demo of the concept.
How to verify that something implements an interface with Mockito
If you want to write a unit test which verifies that something implements a particular interface, or extends a particular class, here’s how…
Continue reading How to verify that something implements an interface with Mockito