Skip to content

Commit

Permalink
docs: add break to switch block (#769)
Browse files Browse the repository at this point in the history
I get that there's only one `case` here but for people plucking this example
and then using it to build out their own reducer, they'll immediately run into
issues as soon as they add a second `case` with no `break` in the first.
  • Loading branch information
skipjack authored Mar 19, 2021
1 parent 5ae3547 commit b7fcf7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions website/docs/example-reducer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const byId = produce((draft, action) => {
action.products.forEach(product => {
draft[product.id] = product
})
break
}
}, INITIAL_STATE)
```
Expand Down

0 comments on commit b7fcf7f

Please sign in to comment.