Skip to content

Commit

Permalink
added comment in reducer, acoording original doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thadeu committed Feb 14, 2019
1 parent 2ebf240 commit b4bb7c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/docs/hooks-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ function reducer(state, action) {
case 'reset':
return init(action.payload);
default:
// Um reducer sempre deve return um state válido
// Alternativamente você pode ser lançar uma exceção if uma ação inválida for disparada
return state;
}
}
Expand Down

0 comments on commit b4bb7c7

Please sign in to comment.