From a5c59fbff4c44e94faa616ac7181d029bdcf9129 Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Wed, 5 Oct 2022 06:53:29 +0000 Subject: [PATCH] doc: Update `react.md` cheatsheet. 1a6e31aca00a10a0695756e7f1c7b130a976e2e7 --- docs/react.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/react.html b/docs/react.html index 47add256..d6f0325c 100644 --- a/docs/react.html +++ b/docs/react.html @@ -837,6 +837,21 @@ }

注意:uiw 组件在 npmjs.com 上找到,需要先安装导入

+

点组件语法技巧

+
const Menu = ({ children }) => (
+  <div className="menu">{children}<div>
+);
+
+Menu.Item = ({ children }) => (
+  <div>{children}<div>
+);
+
+
+
<Menu>
+  <Menu.Item>菜单一</Menu.Item>
+  <Menu.Item>菜单二</Menu.Item>
+<Menu>
+

生命周期

Hooks

PropTypes 属性类型检查