Relay

Relay 是构建数据驱动的React应用程序的JavaScript框架。(Relay is a JavaScript framework for building data-driven React applications. )

  • 所有者: facebook/relay
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Relay 是构建数据驱动的React应用程序的JavaScript框架。

  • 声明式:不再使用命令式API与数据存储进行通信。 只需使用GraphQL声明您的数据需求,并让Relay 知道如何以及何时获取数据。
  • 托管:查询依靠他们的意见旁边,所以你可以很容易地理解你的应用程序。Relay 将查询集中到高效的网络请求中,仅获取所需的内容。
  • 突变:Relay 允许您使用GraphQL突变来变换客户端和服务器上的数据,并提供自动数据一致性,乐观更新和错误处理。
Relay Modern 是继电器的新版本,从头开始,更易于使用,更可扩展,最重要的是能够提高移动设备的性能。 Relay Modern通过静态查询和提前的代码生成来实现。
您可以增加转换现有的Relay 应用程序,或使用Relay Modern启动新的应用程序。

主要指标

概览
名称与所有者facebook/relay
主编程语言Rust
编程语言JavaScript (语言数: 8)
平台
许可证MIT License
所有者活动
创建于2015-08-10 22:09:16
推送于2025-05-02 22:44:46
最后一次提交
发布数90
最新版本名称v19.0.0 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数18.6k
关注者数327
派生数1.8k
提交数10.5k
已启用问题?
问题数2302
打开的问题数586
拉请求数111
打开的拉请求数145
关闭的拉请求数2390
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Relay Build Status npm version

Relay is a JavaScript framework for building data-driven React applications.

  • Declarative: Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.
  • Colocation: Queries live next to the views that rely on them, so you can easily reason about your app. Relay aggregates queries into efficient network requests to fetch only what you need.
  • Mutations: Relay lets you mutate data on the client and server using GraphQL mutations, and offers automatic data consistency, optimistic updates, and error handling.

See how to use Relay in your own project.

Example

The relay-examples repository contains an implementation of TodoMVC. To try it out:

git clone https://github.com/relayjs/relay-examples.git
cd relay-examples/todo
yarn
yarn build
yarn start

Then, just point your browser at http://localhost:3000.

Contribute

We actively welcome pull requests, learn how to contribute.

Users

We have a community-maintained list of people and projects using Relay in production.

License

Relay is MIT licensed.