Created
August 26, 2015 16:29
-
-
Save jhollingworth/27b8fc2b16400db294d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// serverEvents.js | |
export function FOO_CREATED (event) { | |
return { | |
type: 'RECEIVE_FOO', | |
payload: { | |
foo: event.foo | |
} | |
} | |
} | |
export function FOO_DELETED (event) { | |
return { | |
type: 'DELETE_FOO', | |
payload: { | |
fooId: event.id | |
} | |
} | |
} | |
//main.js | |
import serverEvents from './serverEvents' | |
const connection = createPusherConnection(serverEvents, store) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment