You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/readme.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,18 +50,54 @@ Code updates are dynamically reflected through hot-reload
50
50
51
51
##### Making HTTP requests
52
52
53
-
This project includes Axios to make HTTP calls from the React UI App. Use the pre-configured Axios client from `ui/app/utils/axiosClient.ts` to make requests.
53
+
54
+
This project includes Axios to make HTTP calls from the React UI App. The pre-configured Axios client in `ui/app/utils/axiosClient.ts` allows users to make quick API calls with minimal setup.
54
55
55
56
Remember to add any new domains you want to make requests to in the `manifest.json` file under `networkAccess.allowedDomains`.
Figma plugins typically follow a specific structure to separate concerns and facilitate development. The main components are the UI (user interface) and the plugin controller, which interacts with the Figma API. The `manifest.json` file in the root directory defines the plugin's metadata, permissions, and entry points.
71
+
72
+
- The `/ui` directory contains the plugin's user interface (React app). This includes components, styles, and logic for the visual part of the plugin that users interact with. `/ui/app/hooks` and `/ui/app/utils` have reusable hooks and utility functions.
57
73
74
+
- The `/plugin` directory contains the Figma controller. This is where the core plugin logic resides, including interactions with the Figma API, document manipulation, and communication with the UI. The `/plugin/helpers` has resuable code.
58
75
59
76
60
77
61
78
79
+
### React Helpers
62
80
81
+
The `useFigmaMessaging` hook simplifies communication between your React app and Figma.
0 commit comments