TLDR Web Dev · ARTICLES & TUTORIALS
SUPPORTING OFFLINE MODE IN TANSTACK QUERY
Summary from the TLDR Web Dev newsletter
Effect Schema, a validation library, can be used for achieving full offline support with TanStack Query. It allows for bi-directional parsing, eliminating the need for separate schemas for encoding and decoding data. This article goes through how to store data locally (using IndexedDB or LocalStorage), implement cache removal, set cached data, and handle mutations.