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
import { call } from 'redux-saga/effects' | |
import eventObserverSaga from 'saga-event-observer' | |
/* | |
handlers looks something like this: | |
this.eventHandlers = { | |
onEvent: [ this, this.handleEvent ], | |
onError: [ this, this.handleError ], | |
onCancel: [ this, this.handleCancel ], |
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
import { Process } from 'redux-saga-process' | |
import { call, put } from 'redux-saga/effects' | |
import { createSelector } from 'reselect' | |
import { createTaskManager } from 'saga-task-manager' | |
import startUserPositionObserver from 'saga-geolocation-observer' | |
import handleUserPosition from './sagas/handleUserPosition' |
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
import { Process } from 'redux-saga-process'; | |
import { call, put } from 'redux-saga/effects'; | |
import { createSelector } from 'reselect'; | |
import { createTaskManager } from 'saga-task-manager'; | |
import startUserPositionObserver from 'saga-geolocation-observer'; | |
import handleUserPosition from './sagas/handleUserPosition'; |
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
import { createStore, applyMiddleware, compose } from 'redux' | |
import reduxCSS from 'redux-css' | |
import reducers from './reducers' | |
/* | |
initial styles are the variables that we should set immediately. | |
Note that '--' is optional, it will be added for you if you don't | |
include it. | |
Objects are flattened { myKey: { myNested: 'red' } } -> --myKeymyNested: red |
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
import { Process } from 'redux-saga-process'; | |
const build_config = config => ({ | |
pid: 'async', | |
exports: ['actions', 'selectors'], | |
log: false, | |
...config, | |
}); | |
const loadProcessOnAction = 'AUTH_SESSION'; |
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
export default { | |
// The main routes expects an object rather than an array. We can use this | |
// to configure the routes and how they will behave. | |
// When we are attempting to render a secured route the onSecureRequest will | |
// be called. This should provide a promise that resolves to a SecurityProvider | |
// component which will wrap any secure routes. | |
// | |
// As we nest routes, new onSecureRequest properties will be used if provided, otherwise | |
// any secure routes will use the first onSecureRequest |
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
import { Process } from 'redux-saga-process'; | |
import { put, call } from 'redux-saga/effects'; | |
const build_config = config => ({ | |
reduces: 'posts', | |
pid: 'posts', | |
exports: ['actions', 'selectors'], | |
log: false, | |
...config, | |
}); |
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
import { Process } from 'redux-saga-process'; | |
import { call, put, select } from 'redux-saga/effects'; | |
import { createSelector } from 'reselect'; | |
import _ from 'lodash'; | |
/** | |
* GET_DEFAULT_WIDGET_STATE | |
*/ | |
const GET_DEFAULT_WIDGET_STATE = () => ({ | |
rehydrated: false, |
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
/* | |
A Process allows us to define a modular "Logic Component" which may | |
interact with our app in a variety of ways based on it's design. | |
Processes are given properties when configured which will define if/how | |
they reduce the redux state, what actions they make available to our | |
components, when our process should load and with what scope, | |
what types we want to listen for, and more. | |
This allows us to build truly encapsulated and re-useable application |
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
/* | |
A Process allows us to define a modular "Logic Component" which may | |
interact with our app in a variety of ways based on it's design. | |
Processes are given properties when configured which will define if/how | |
they reduce the redux state, what actions they make available to our | |
components, when our process should load and with what scope, | |
what types we want to listen for, and more. | |
This allows us to build truly encapsulated and re-useable application |
OlderNewer