Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created May 9, 2018 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/a8e4432bff67c12567c657bc3d247d02 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/a8e4432bff67c12567c657bc3d247d02 to your computer and use it in GitHub Desktop.
import { createStore } from "redux";
export const names = (state = "", action) => {
if (action.type === "NAME_CHANGE") {
state = action.value;
}
return state;
};
export const store = createStore(names);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment