Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Mar 29, 2020
1 parent a774ca1 commit 5138078
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions website/docs/docusaurus-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ function Home() {

### `<BrowserOnly/>`

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';

<BrowserOnly>
{/* Something that should be excluded during build process prerendering. */}
{() => {
/* Something that should be excluded during build process prerendering. */
}}
</BrowserOnly>;
```

Expand Down

0 comments on commit 5138078

Please sign in to comment.