diff --git a/docs/basics/ExampleTodoList.md b/docs/basics/ExampleTodoList.md
index d92d0b20ca..87cac7405d 100644
--- a/docs/basics/ExampleTodoList.md
+++ b/docs/basics/ExampleTodoList.md
@@ -182,7 +182,7 @@ const Link = ({ active, children, onClick }) => {
return (
{
e.preventDefault()
onClick()
@@ -259,12 +259,13 @@ import TodoList from '../components/TodoList'
const getVisibleTodos = (todos, filter) => {
switch (filter) {
- case 'SHOW_ALL':
- return todos
case 'SHOW_COMPLETED':
return todos.filter(t => t.completed)
case 'SHOW_ACTIVE':
return todos.filter(t => !t.completed)
+ case 'SHOW_ALL':
+ default:
+ return todos
}
}
diff --git a/docs/basics/UsageWithReact.md b/docs/basics/UsageWithReact.md
index 43be4842f1..a09285a494 100644
--- a/docs/basics/UsageWithReact.md
+++ b/docs/basics/UsageWithReact.md
@@ -179,7 +179,7 @@ const Link = ({ active, children, onClick }) => {
return (
{
e.preventDefault()
onClick()
@@ -235,12 +235,13 @@ To use `connect()`, you need to define a special function called `mapStateToProp
```js
const getVisibleTodos = (todos, filter) => {
switch (filter) {
- case 'SHOW_ALL':
- return todos
case 'SHOW_COMPLETED':
return todos.filter(t => t.completed)
case 'SHOW_ACTIVE':
return todos.filter(t => !t.completed)
+ case 'SHOW_ALL':
+ default:
+ return todos
}
}