loona

? Application State Management done with GraphQL

Github星跟踪图

CircleCI Join the community on Spectrum

Loona is a state management library built on top of Apollo Client. It brings the simplicity of managing remote data with Apollo, to your local state. Instead of maintaining a second store for your local data with tools like Redux, MobX or NGRX, use Loona to keep data in just one space and make it a single source of truth.

With Loona you get all the benefits of Apollo, like caching, offline persistence and more. On top of that you gain all the other benefits like stream of actions, better sepatation between mutation and store updates.

UI Frameworks

Loona works with React and Angular:

Documentation

All of the documentation for Loona including usage articles and helpful recipes lives on loonajs.com.

Read about Loona

Features

  • Single store - Keep your remote and local data in just one space and make it a single source of truth.
  • Separation of concerns - Loona helps you to keep every piece of your data flow separated.
  • Benefits of Apollo - You get all the benefits of Apollo, like caching, offline persistence and more.
  • Works on Mobile - Works out of the box with React Native and NativeScript.

Concept

Loona can be described by few core concepts. First two of them are related to GraphQL:

  • Queries - ask for what you need.
  • Mutations - a way to modify your remote and local data.
  • Store - a single source of truth of all your data.

It also uses a concept of:

  • Actions - declarative way to call a mutation or trigger a different action
  • Updates - modify the store after a mutation happens

By having it all, Loona helps you to keep every piece of your data's flow separated.


Contributing

This project uses Lerna.

Bootstraping:

yarn install

Running tests locally:

yarn test

Formatting code:

yarn format

This project uses TypeScript for static typing. You can get it built into your editor with no configuration by opening this project in Visual Studio Code, an open source IDE which is available for free on all platforms.

主要指标

概览
名称与所有者kamilkisiela/loona
主编程语言TypeScript
编程语言TypeScript (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2018-05-12 19:23:45
推送于2020-10-26 03:03:28
最后一次提交2019-04-06 04:40:48
发布数2
最新版本名称1.0.0 (发布于 )
第一版名称v1.0.0-alpha.1 (发布于 2018-06-26 18:28:35)
用户参与
星数266
关注者数14
派生数13
提交数489
已启用问题?
问题数18
打开的问题数17
拉请求数470
打开的拉请求数26
关闭的拉请求数30
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?