Skip to content

Commit 01bb579

Browse files
committed
Fix JSX in readme
1 parent 68e43c0 commit 01bb579

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@ const { portrait } = useWindowOrientation();
5252
What's this hook good for? Say you have two components, `Chart` and `Explanation`. You want `Explanation` to come first if the window is portrait, but you want `Chart` to come first if the window is landscape. Then arrange them in your JSX like this:
5353

5454
```jsx
55-
{
56-
portrait && <Explanation />;
57-
}
55+
{portrait && <Explanation />}
5856
<Chart />;
59-
{
60-
landscape && <Explanation />;
61-
}
57+
{landscape && <Explanation />}
6258
```
6359

6460
Or say you want to creep out your users by divining the orientation of their window:

0 commit comments

Comments
 (0)