瀏覽代碼

docs: Add info on react types for admin ui

Michael Bromley 1 年之前
父節點
當前提交
ea682e4a20
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      docs/docs/guides/extending-the-admin-ui/getting-started/index.md

+ 24 - 0
docs/docs/guides/extending-the-admin-ui/getting-started/index.md

@@ -49,6 +49,30 @@ yarn add --dev @vendure/ui-devkit
 </TabItem>
 </Tabs>
 
+:::info
+If you plan to use React components in your UI extensions, you should also install the `@types/react` package:
+
+
+<Tabs>
+<TabItem value="npm" label="npm" default>
+
+```bash
+npm install --save-dev @types/react
+```
+
+</TabItem>
+<TabItem value="yarn" label="yarn">
+
+```bash
+yarn add --dev @types/react
+```
+
+</TabItem>
+</Tabs>
+
+:::
+
+
 You can then create the following folder structure to hold your UI extensions:
 
 ```