Skip to content

Commit

Permalink
[docs] Change ponyfill to polyfill in use-media-query.md (#14215)
Browse files Browse the repository at this point in the history
* Change ponyfill to polyfill in use-media-query.md

* update the wording as suggested by &MathiasKandelborg
  • Loading branch information
MathiasKandelborg authored and oliviertassinari committed Jan 19, 2019
1 parent db6ee47 commit 8e7e813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/pages/layout/use-media-query/use-media-query.md
Expand Up @@ -53,7 +53,7 @@ function MyComponent() {

## Server-side rendering

You will need to use a [matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) ponyfill on the server, we recommend using [css-mediaquery](https://github.com/ericf/css-mediaquery).
An implementation of [matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) is required on the server, we recommend using [css-mediaquery](https://github.com/ericf/css-mediaquery).
We also encourage the usage of the `unstable_useMediaQueryTheme` version of the hook that fetches properties from the theme. This way, you can provide a `ssrMatchMedia` option once for all your React tree.

{{"demo": "pages/layout/use-media-query/ServerSide.js", "react": "next"}}
Expand Down

0 comments on commit 8e7e813

Please sign in to comment.