August 2017
Beginner
374 pages
10h 41m
English
The next step is handling the action in a reducer. To create a reducer, perform the following steps:
import { NAVIGATE } from '../actionTypes'
export default function routeReducer (state = 'main', action) {
const { type, page } = action if (type === NAVIGATE) { return page } return state}
Read now
Unlock full access