If you have a blank screen on one device but not another, see https://mcmap.net/q/1019626/-why-does-my-react-redux-typescript-app-work-everywhere-except-iphone-6-ios-12-0-1-where-it-is-a-blank-white-screen
Also, this could happen if your code uses fetch
somewhere, and your browser doesn't support it.
Check for browser and OS support: https://caniuse.com/#search=fetch
We use fetch
API in the examples. It is a new API for making network
requests that replaces XMLHttpRequest
for most common needs. Because
most browsers don't yet support it natively, we suggest that you use
cross-fetch
library:
// Do this in every file where you use `fetch`
import fetch from 'cross-fetch'
Internally, it uses whatwg-fetch
polyfill on the client,
and node-fetch
on the server, so you won't need to change API calls if
you change your app to be universal.
Be aware that any fetch
polyfill assumes a Promise polyfill is already
present. The easiest way to ensure you have a Promise polyfill is to
enable Babel's ES6 polyfill in your entry point before any other code
runs:
// Do this once before any other code in your app
import 'babel-polyfill'
const store = createStore(reducer, applyMiddleware(sagaMiddleware))
besides that I don't do any other store enhancements. To keep the store state, I'm using immutable. Would sharing a source with you help? – Stempson