[FIX] useSSR - remove redundant code
Remove redundant code from bottom of snippet, given that it also appears in its example (and relates more to the example/usage than the setup).
This commit is contained in:
@ -38,12 +38,6 @@ const useSSR = (callback, delay) => {
|
|||||||
|
|
||||||
return React.useMemo(() => Object.assign(Object.values(useSSRObject), useSSRObject), [inBrowser]);
|
return React.useMemo(() => Object.assign(Object.values(useSSRObject), useSSRObject), [inBrowser]);
|
||||||
};
|
};
|
||||||
|
|
||||||
const SSRChecker = props => {
|
|
||||||
let { isBrowser, isServer } = useSSR();
|
|
||||||
|
|
||||||
return <p>{ isBrowser ? 'Running on browser' : 'Running on server' }</p>;
|
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
|
|||||||
Reference in New Issue
Block a user