From 8488f7b8db377089c7fb6a67d9a90fb3749582eb Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Thu, 9 Nov 2023 09:01:04 -0500 Subject: [PATCH] docs: adds apiRoute to useLivePreview args (#4073) --- docs/live-preview/frontend.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/live-preview/frontend.mdx b/docs/live-preview/frontend.mdx index 5aa7ffa67a..e034083316 100644 --- a/docs/live-preview/frontend.mdx +++ b/docs/live-preview/frontend.mdx @@ -10,13 +10,14 @@ While using Live Preview, the Admin panel emits a new `window.postMessage` event Wiring your front-end into Live Preview is easy. If your front-end application is built with React or Next.js, use the [`useLivePreview`](#react) React hook that Payload provides. In the future, all other major frameworks like Vue, Svelte, etc will be officially supported. If you are using any of these frameworks today, you can still integrate with Live Preview yourself using the underlying tooling that Payload provides. See [building your own hook](#building-your-own-hook) for more information. -By default, all hooks require the following args: +By default, all hooks accept the following args: | Path | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **`serverURL`** \* | The URL of your Payload server. | | **`initialData`** | The initial data of the document. The live data will be merged in as changes are made. | | **`depth`** | The depth of the relationships to fetch. Defaults to `0`. | +| **`apiRoute`** | The path of your API route as defined in `routes.api`. Defaults to `/api`. | _\* An asterisk denotes that a property is required._