Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 2f215c5

Browse files
LStAmourMatt Goo
authored and
Matt Goo
committed
docs(chips): readme - setState takes a state object (#606)
1 parent f6e4725 commit 2f215c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/chips/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class MyChoiceChips extends React.Component {
5959
<ChipSet
6060
choice
6161
selectedChipIds={this.state.selectedChipIds}
62-
handleSelect={(selectedChipIds) => this.setState(selectedChipIds)}
62+
handleSelect={(selectedChipIds) => this.setState({selectedChipIds})}
6363
>
6464
<Chip id={'chip1'} label='Small' />
6565
<Chip id={'chip2'} label='Medium' />
@@ -85,7 +85,7 @@ class MyFilterChips extends React.Component {
8585
<ChipSet
8686
filter
8787
selectedChipIds={this.state.selectedChipIds}
88-
handleSelect={(selectedChipIds) => this.setState(selectedChipIds)}
88+
handleSelect={(selectedChipIds) => this.setState({selectedChipIds})}
8989
>
9090
<Chip id={'chip1'} label='Tops' />
9191
<Chip id={'chip2'} label='Bottoms' />

0 commit comments

Comments
 (0)