# @arcgis/coding-components-react 中文文档

规范地址：https://npmcn.com/package/%40arcgis/coding-components-react/

版本：5\.2\.1
npm 元数据更新时间：2026-11-06T16:26:34.526Z
中文译文更新时间：2026-11-06T14:13:53.467Z
软件包许可：SEE LICENSE IN LICENSE\.md

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40arcgis/coding-components-react
原文对照：https://npmcn.com/package/%40arcgis/coding-components-react/?lang=original
项目主页：https://developers.arcgis.com/javascript/latest/

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：8.7 kB，6 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：5 个
- peer 依赖：react \>=18\.0\.0 \<20\.0\.0，@arcgis/core 5\.2\.1
- 首次发布：2023-09-12T19:52:07.705Z
- 最新版本发布：2026-11-06T16:26:34.355Z
- 近 30 天下载量：8855（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：1485（近 12 个月 492 个）

## 中文简介

一组将 ArcGIS 编码组件包裹起来的回放组件

## 安装

```sh
npm install @arcgis/coding-components-react
```

也可以使用：`pnpm add @arcgis/coding-components-react`、`yarn add @arcgis/coding-components-react`、`bun add @arcgis/coding-components-react`

## README

# JavaScript 的 ArcGIS 映射 SDK - 编码组件反应

用于JavaScript的ArcGIS地图SDK提供了一套即用UI组件来简化GIS网络应用程序的创建过程. 目前,这个软件包只包含 [拱门](https://developers.arcgis.com/arcade/) 表达式代码编辑器.

想马上开始吗? 见 [开始吧](https://developers.arcgis.com/javascript/latest/get-started/) 或者试试看 [样本应用](https://github.com/Esri/jsapi-resources/tree/main/component-samples) 用于各种受欢迎的框架、模块捆绑器和TypeScript.

## 折旧通知

> 警告:编码组件回放在v5.0.0中被贬值,并会被去掉v6.0.0.

这个 `@arcgis/coding-components-react` 软件包最初是用React 18开发的,其中包装是使用自定义元素所必需的。 在React 19的自定义元素支持下,这些包装已经不再需要了.

考虑升级到19+反应并使用 `@arcgis/coding-components` 直接说 看看这个 [文档](https://developers.arcgis.com/javascript/latest/get-started/#react) 要开始.

## 文档

-   [关键特性](https://developers.arcgis.com/javascript/latest/key-features/)
-   [用反应构建](https://developers.arcgis.com/javascript/latest/get-started/#react)
-   [API 和组件参考](https://developers.arcgis.com/javascript/latest/references/)
-   [功能样本](https://developers.arcgis.com/javascript/latest/sample-code/)
-   [类型脚本设置](https://developers.arcgis.com/javascript/latest/get-started/#typescript)

## 资源

-   [ArcGIS 博客](https://blogs.esri.com/esri/arcgis/tag/javascript/)
-   [系统要求](https://developers.arcgis.com/javascript/latest/system-requirements/)
-   [使用条件](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use)
-   [许可证发放](https://developers.arcgis.com/javascript/latest/licensing/)
-   [与 `next` 版本](https://github.com/Esri/feedback-js-api-next/blob/main/README.md)

## 支助

-   关于使用此软件包或用于 JavaScript 的 ArcGIS Maps SDK 的普通问题 ? 见 [Esri开发者社区](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript)。 。 。 .
-   [技术支持](https://support.esri.com/)。 。 。 .

## 快速启动指南

一个 [实例](https://github.com/Esri/jsapi-resources/tree/50579b9362b846e869a343b660c5a2415176a275/component-samples/coding-components/samples/react) 可从jsapi-resources repo中的4.31版中获取.

## 许可证

该软件包根据下列条款获得许可: `LICENSE.md` 文件,位于软件包的根,并在 [https://js.arcgis.com/5.2/LICENSE.txt](https://js.arcgis.com/5.2/LICENSE.txt)。 。 。 . 关于第三方通知,见 [https://js.arcgis.com/5.2/第三方-通知.txt](https://js.arcgis.com/5.2/third-party-notices.txt)。 。 。 .

## 常见问题

### @arcgis/coding-components-react 是什么？

一组将 ArcGIS 编码组件包裹起来的回放组件

### 如何安装 @arcgis/coding-components-react？

在项目目录运行 npm install @arcgis/coding-components-react，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=18\.0\.0 \<20\.0\.0）、@arcgis/core（5\.2\.1）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @arcgis/coding-components-react 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @arcgis/coding-components-react 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @arcgis/coding-components-react 可以商用吗？

@arcgis/coding-components-react 使用 SEE LICENSE IN LICENSE\.md 许可。许可条款写在包内的独立文件中，请阅读该文件确认可否商用。以上为概括，不构成法律意见，请以许可原文为准。

### @arcgis/coding-components-react 的下载量有多少？

根据 npm 官方下载统计，@arcgis/coding-components-react 在 2026/10/07 – 2026/11/05 这 30 天内被下载 8,855 次，日均约 295 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @arcgis/coding-components-react 还在维护吗？

最新版本 5\.2\.1 发布于 2026/11/07（1 天前）；至今共发布 1485 个版本，其中过去 12 个月发布了 492 个；首次发布于 2023/09/13。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

