From 05826acc048f643ef2ba55e8e2336e578b7468d0 Mon Sep 17 00:00:00 2001 From: goosewobbler <432005+goosewobbler@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:12:44 +0000 Subject: [PATCH] Update getting-started.md --- docs/getting-started.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 10ce8e9..90c5e66 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -22,12 +22,15 @@ store = createStore()(() => initialState); #### Initialize Bridge in Main process -In the main process, the bridge needs your store and an array of BrowserWindow, BrowserView, and WebContentsView objects for your app, so for a single window application: +In the main process, the bridge needs your store and an array of window or view objects for your app. `BrowserWindow`, `BrowserView` and `WebContentsView` objects are supported. + +So, for a single window application: ```ts import { mainZustandBridge } from 'zutron/main'; // create mainWindow +const mainWindow = new BrowserWindow(windowConfig); const { unsubscribe } = mainZustandBridge(store, [mainWindow]); @@ -51,7 +54,7 @@ contextBridge.exposeInMainWorld('zutron', handlers); #### Create hook in Renderer process -Finally, in the renderer process you will need to create the useStore hook: +Finally, in the renderer process you will need to create the `useStore` hook: `/renderer/hooks/useStore.ts`