Skip to content
On this page

Migration to Farfetched from plain Effects

This tutorial describes how to add Farfetched to an existing application uses Effects for data fetching step by step without rewriting big parts of the codebase.

TIP

This tutorial is not a replacement for the Thorough Tutorial which is a better starting point for learning Farfetched. Furthermore, it is assumed that you have read Thorough Tutorial and know the basics of Farfetched.

Farfetched is built with continues adoption in mind, so there are straightforward steps to add it to an existing application and embrace its benefits:

  1. Wrap existing data fetching Effects to Queries and Mutations
  2. Replace existing add-ons with Farfetched operators like retry, cache or connectQuery
  3. Add strict Contracts to server responses
  4. Migrate to specific factories like createJsonQuery and createJsonMutation
  5. Apply declarative approach with Trigger API and keepFresh operator
  6. Continue migrating application step-by-step

Released under the MIT License.