UNPKG

quickstruc

Version:

quickstruc is a Node.js-powered module designed to streamline project scaffolding.

24 lines (19 loc) 391 B
// // Action type constants export const SET_USER = "SET_USER"; // Initial state export const initialState = { user: null, }; // Reducer function export const _reducer = (state = initialState, action) => { switch (action.type) { case SET_USER: return { ...state, user: action.payload, }; default: return state; } };