Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit 9540614

Browse files
committed
Added tests, prop-types, comments for Show and ArrayMap
1 parent 62dbef8 commit 9540614

File tree

14 files changed

+7198
-45
lines changed

14 files changed

+7198
-45
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ const Menu = ({ showMenuItems }) => (
3131
### After
3232

3333
```javascript
34-
import { Array, Show } from 'react-semantics';
34+
import { ArrayMap, Show } from 'react-semantics';
3535

3636
const Menu = ({ showMenuItems }) => (
3737
<nav>
3838
<a href="/">Home</a>
3939
<Show when={showMenuItems}>
4040
<ul>
41-
<Array.Map
41+
<ArrayMap
4242
array={['prices', 'contact', 'about']}
4343
render={m => (
4444
<li key={m}>
@@ -59,13 +59,16 @@ Coming soon...
5959
## Usage
6060

6161
```javascript
62-
import React from 'react';
63-
import { Show } from 'react-semantics';
62+
import { ArrayMap, Show } from 'react-semantics';
63+
64+
<ArrayMap
65+
array={[1, 2, 3]}
66+
render={n => <div key={n}>{n}</div>}
67+
/>
6468

6569
<Show when={5 === 2 + 2}>
6670
<div>Will only render in 1984</div>
6771
</Show>
68-
6972
```
7073

7174
## API

0 commit comments

Comments
 (0)