diff --git a/README-zh_CN.md b/README-zh_CN.md
index 53fa5f36e9..0b58259129 100644
--- a/README-zh_CN.md
+++ b/README-zh_CN.md
@@ -19,7 +19,7 @@
-简体中文 | [English](./README.md)
+简体中文 | [English](./README.md)
TDesign 适配桌面端的组件库,适合在 React 16.x 及以上技术栈的项目中使用。
@@ -37,23 +37,28 @@ TDesign 适配桌面端的组件库,适合在 React 16.x 及以上技术栈的
npm i tdesign-react
```
+```shell
+yarn add tdesign-react
+```
+
+```shell
+pnpm add tdesign-react
+```
+
# 🔨 基础使用
推荐使用 Webpack 或 Rollup 等支持 tree-shaking 特性的构建工具,无需额外配置即可实现组件按需引入:
-```js
+```tsx
+import React from 'react';
import { Button } from 'tdesign-react';
-import 'tdesign-react/es/style/index.css'; // 少量公共样式
+import 'tdesign-react/es/style/index.css';
function App() {
- return (
-
- );
+ return ;
}
-ReactDOM.render(, document.getElementById('app'));
+ReactDOM.createRoot(document.getElementById('app')).render();
```
npm package 中提供了多种构建产物,可以阅读 [这里](https://github.com/Tencent/tdesign/blob/main/docs/develop-install.md) 了解不同目录下产物的差别。
@@ -66,7 +71,7 @@ npm package 中提供了多种构建产物,可以阅读 [这里](https://githu
| [](http://godban.github.io/browsers-support-badges/)
IE / Edge | [](http://godban.github.io/browsers-support-badges/)
Firefox | [](http://godban.github.io/browsers-support-badges/)
Chrome | [](http://godban.github.io/browsers-support-badges/)
Safari |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
+| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
详情参见[桌面端组件库浏览器兼容性说明](https://github.com/Tencent/tdesign/wiki/Browser-Compatibility)
diff --git a/README.md b/README.md
index adcbfb60ba..925480a03a 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
-English | [简体中文](./README-zh_CN.md)
+English | [简体中文](./README-zh_CN.md)
TDesign React is a UI component library for React 16.x and desktop application.
@@ -37,21 +37,26 @@ TDesign React is a UI component library for React 16.x and desktop application.
npm i tdesign-react
```
+```shell
+yarn add tdesign-react
+```
+
+```shell
+pnpm add tdesign-react
+```
+
# 🔨 Usage
-```js
+```tsx
+import React from 'react';
import { Button } from 'tdesign-react';
import 'tdesign-react/es/style/index.css';
function App() {
- return (
-
- );
+ return ;
}
-ReactDOM.render(, document.getElementById('app'));
+ReactDOM.createRoot(document.getElementById('app')).render();
```
The package of tdesign-react provides kinds of bundles, read [the documentation](https://github.com/Tencent/tdesign/blob/main/docs/develop-install.md) for the detail of differences between bundles.
@@ -64,7 +69,7 @@ Visit [TDesign Starter](https://tdesign.tencent.com/starter/react/) to experienc
| [](http://godban.github.io/browsers-support-badges/)
IE / Edge | [](http://godban.github.io/browsers-support-badges/)
Firefox | [](http://godban.github.io/browsers-support-badges/)
Chrome | [](http://godban.github.io/browsers-support-badges/)
Safari |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
+| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
Read our [browser compatibility](https://github.com/Tencent/tdesign/wiki/Browser-Compatibility) for more details.
@@ -94,4 +99,4 @@ Create your [Github issues](https://github.com/Tencent/tdesign-react/issues) or
# License
-The MIT License. Please see [the license file](./LICENSE) for more information.
\ No newline at end of file
+The MIT License. Please see [the license file](./LICENSE) for more information.