From 03cb88a7ae698545bd8bc960992949e94a484a59 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Wed, 31 Jul 2019 07:10:47 -0500 Subject: [PATCH] Add import statement to visibilityFilter example (#3487) In this code example, SET_VISIBILITY_FILTER is used in a switch case, but it is never imported first. It is imported in the subsequent example code block in the docs. This is confusing, especially for users who aren't familiar with switch statements. --- docs/basics/Reducers.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/basics/Reducers.md b/docs/basics/Reducers.md index eb0e1de488..c2c926c08d 100644 --- a/docs/basics/Reducers.md +++ b/docs/basics/Reducers.md @@ -92,6 +92,13 @@ function todoApp(state = initialState, action) { Now let's handle `SET_VISIBILITY_FILTER`. All it needs to do is to change `visibilityFilter` on the state. Easy: ```js +import { + SET_VISIBILITY_FILTER, + VisibilityFilters +} from './actions' + +... + function todoApp(state = initialState, action) { switch (action.type) { case SET_VISIBILITY_FILTER: