Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Sargent mksarge

View GitHub Profile
@mksarge
mksarge / Link.js
Created Jun 16, 2017
A store-connected <Link/> component for declarative navigation. Use with: https://github.com/mksarge/redux-first-routing
View Link.js
@mksarge
mksarge / actions.js
Created Jun 13, 2017
A minimal Redux-first routing implementation in <100 lines of code. Learn more: https://medium.com/@mksarge/98926ebf53cb
View actions.js
import { PUSH, REPLACE, GO, GO_BACK, GO_FORWARD, LOCATION_CHANGE } from './constants';
export const push = (href) => ({
type: PUSH,
payload: href,
});
export const replace = (href) => ({
type: REPLACE,
payload: href,
You can’t perform that action at this time.