Introduction
Orbit is an Apollo Client modular state management abstraction for React.
Apollo Client is much more than a simple GraphQL client, it offers a comprehensive caching API that leverages GraphQL's rich type information system (schema) to provide features like cache normalization, optimistic UI and more.
Orbit aims to bridge the gap between Apollo Client and traditional state management libraries like Redux.
It does so by providing the following features:
- Comprehensive state management: Orbit combines the strengths of Apollo Client and event based state management (flux architecture), providing a unified solution for managing both local and remote data.
- Decoupling: Separate state management code from component code using modular
statedefinitions andactionhandlers. - Modular: Each
statedefinition manages its own slice of the cache. - Separation of concerns (SoC): Different
stateslices can handle the sameMutationorActionindependently. - Event-driven architecture: Actions enable event-driven application design.
- Testability:
statelogic can be tested in isolation, enhancing testability.