Skip to content

Commit fdc8d22

Browse files
committed
Further details about the parent hook in README
1 parent b60b112 commit fdc8d22

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,13 @@ established.
6161
By default, the child window will be automatically closed when the
6262
parent window closes. To leave it open, pass `{ onMessage, closeWithParent: false }`
6363
to `useWindowManager`.
64+
65+
`openChildWindow` takes 4 arguments - the URL to open, the initial state to pass the child,
66+
the name of the child window, and
67+
[its features](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#windowfeatures).
68+
69+
> Your app needs to define a route for the URL passed to `openChildWindow`.
70+
> This is where the child hook will be used.
71+
72+
For a complete example, refer to
73+
[the examples](https://github.com/davidsteiner/react-presentation-hook/blob/main/examples/vite-tanstack-app/src/routes/index.tsx).

0 commit comments

Comments
 (0)