From 51380782f72e94aefb149d07783a27f0f0b41e9d Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sun, 29 Mar 2020 12:07:57 +0300 Subject: [PATCH] Fix docs --- website/docs/docusaurus-core.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/docusaurus-core.md b/website/docs/docusaurus-core.md index ac86ce09648b..1c8455fbad54 100644 --- a/website/docs/docusaurus-core.md +++ b/website/docs/docusaurus-core.md @@ -115,13 +115,15 @@ function Home() { ### `` -This component excludes its `children` during the prerendering stage of the build process. This is useful for hiding code that is only meant to run in the browsers (e.g. where the `window`/`document` objects are being accessed). +This component excludes `children` passed via render function during the prerendering stage of the build process. This is useful for hiding code that is only meant to run in the browsers (e.g. where the `window`/`document` objects are being accessed). -```jsx {1,7} +```jsx import BrowserOnly from '@docusaurus/BrowserOnly'; - {/* Something that should be excluded during build process prerendering. */} + {() => { + /* Something that should be excluded during build process prerendering. */ + }} ; ```