Skip to content

Commit

Permalink
Add over to <Map /> documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
egoarka authored and TrySound committed Jul 20, 2018
1 parent 0cb59d5 commit 1299916
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/components/Map.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The onChange event of the Map is called whenever the state changes.

## Map Children Props

TL;DR: `{ values, set, get }`
TL;DR: `{ values, set, get, over }`

**values**
`object`
Expand All @@ -49,6 +49,11 @@ Behind the scenes it's just you raw state.
`(key: string, value: any) => void`
Assigns `value` to `key`.

**over**
`(key: string, fn: (key: string) => string) => void`
Takes a `key` and `function`, map a function over key's `value`.
After applying function, the shape of your state stays the same.

**get**
`(key: string) => value: any`
Get assigned `value` from `key`

0 comments on commit 1299916

Please sign in to comment.