/reposition-satellite
page then trigger a data refresh of satellite position... this toolkit is for you.bundles/users.js:
bundles/index.js:
components/root.js
components/some-component.js
import { combineReducers } from 'redux-bundler'
. However, this also means you end up with code from redux with the debug blocks if (process.env.NODE_ENV !== "production")
still present. Build your app with NODE_ENV="production" before minification to strip that out for production. You can use DefinePlugin for webpack (http://stackoverflow.com/questions/30030031), loose-envify (https://github.com/zertosh/loose-envify) for browserify, or rollup-plugin-replace for Rollup (https://github.com/rollup/rollup-plugin-replace) to do this.createAsyncResourceBundle
for an example of this.select
.react
instead of select
that will be evaluated on a regular basis and can return actions to trigger in response. This enables really, really interesting patterns of being able to recover from failure and retrying failed requests, etc. The level of reliability that can be achieved here is very powerful especially for use in PWAs that may well be offline or have really poor network conditions.connect()
doesn't have to do any dirty checking, so the binding code becomes very simple.localStorage.debug
to a truthy value) the store instance is bound to window
allowing console debugging of all your selectors, action creators via the JS console. For example you can type stuff like store.selectIsLoggedIn()
to see results or store.doLogout()
to trigger that action creator even if you don't have UI built for that yet.redux-thunk
doesn't suit their needs. This generally happens once they need to do something more complex than simple data fetches. Solutions like redux-loop or redux-saga attempt to solve this issue. I've never liked either one or any other solution that I've seen, for that matter. They're generally way more complicated than redux-thunk and in my opinion, nearly impossible for beginners to grok.componentDidMount
to trigger data fetches required by that component. But this sucks for many reasons:/reports
in the pathname.react
it will be assumed to be a reactor. From a reactor you can check for whatever conditions in your app you can dream up and then return the action you want to dispatch. And, to be consistent with the decoupled philosophies, you can return an object containing the name of the action creator you want to trigger and the arguments to call it with.