ReSift

ReSift

  • Docs
  • API
  • Help
  • GitHub

โ€บGuides

Introduction

  • What is ReSift?
  • Installation

Tutorial

  • ReSift Rentals

Main Concepts

  • What's a fetch?
  • How to define a fetch
  • Making state consistent
  • Making sense of statuses
  • What are data services?
  • Error handling
  • Custom hooks

Examples

  • ReSift Notes (CRUD)
  • Infinite scroll
  • Custom hooks and React Router

Guides

  • ReSift vs Apollo and Relay
  • HTTP proxies
  • Usage with TypeScript
  • Usage with Redux
  • Usage with classes

API

  • About these docs
  • useStatus
  • useError
  • useDispatch
  • useData
  • useClearFetch
  • isUnknown
  • isNormal
  • isLoading
  • isError
  • defineFetch
  • dataServiceReducer
  • createStoreKey
  • createHttpService
  • createHttpProxy
  • createDataService
  • createActionType
  • combineStatuses
  • ResiftProvider
  • Guard
  • CanceledError
  • UNKNOWN
  • NORMAL
  • LOADING
  • ERROR
Edit

ReSift vs Apollo and Relay

What are Apollo and Relay?

Similar to ReSift, the Apollo client and Relay are state management libraries for fetches. They have the same goals as ReSift. However, the biggest distinction between Apollo and Relay and ReSift is that Apollo and Relay are GraphQL clients. This means that you must to use GraphQL if you want to use Apollo or Relay.

ReSift vs Apollo/Relay

ReSift has the same responsibilities as the Apollo client and Relay. The Apollo client, Relay, and ReSift function as libraries that handle fetching, caching, and reporting the status of inflight requests. They're are all global state containers that will hold the state of your data fetches outside of your component tree.

ReSift is has one major advantage: ReSift does not require GraphQL.

ReSift is agnostic on how to get data. You can use traditional RESTful services, local or async storage, and even GraphQL too.

However, since Apollo and Relay are GraphQL only, they can leverage data schemas from GraphQL to normalize incoming data inside their caching solutions automatically. This means that if you update a piece of information using Apollo or Relay, that piece of information will update anywhere it's used.

This is the major trade off of ReSift: because ReSift doesn't have schema information, ReSift can't automatically normalize your data.

Instead of requiring schemas, ReSift allows you specify how a piece of information should be updated when another piece of information changes. See the Making state consistent doc for more info.

We believe this is sufficient for creating data-driven applications and a great alternative to Apollo and Relay.

(However, if you are using GraphQL, we recommend you just use Apollo or Relay.)

Comparison chart

Feature ๐Ÿ‘‡ReSiftRelayApollo
Global cache/global injectionโœ…โœ…โœ…
Automatic pending statusโœ…โœ…โœ…
Automatic normalization๐Ÿ”ดโœ…โœ…
Compatible with RESTโœ…๐Ÿ”ด๐Ÿ”ด
Last updated on 11/4/2019
โ† Custom hooks and React RouterHTTP proxies โ†’
  • What are Apollo and Relay?
  • ReSift vs Apollo/Relay
  • Comparison chart
ReSift
Docs
What is ReSift?What's a fetch?API
Community
Ask a questionOpen an issue@ meLeave feedback
More
StarBuild StatusCoverage Status
Copyright ยฉ 2021 Sift
www.justsift.com