Skip to content

Instantly share code, notes, and snippets.

@jhollingworth
Created August 26, 2015 16:29
Show Gist options
  • Save jhollingworth/27b8fc2b16400db294d0 to your computer and use it in GitHub Desktop.
Save jhollingworth/27b8fc2b16400db294d0 to your computer and use it in GitHub Desktop.
// 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