Reputation: 103
This issue has nothing to do with this post.
I built a full-stack application using create-react-app, Express, and MongoDB. As you can see, I successfully deployed it on Heroku (no errors in the log). The root ("/") page is supposed to be empty for now.
The problem arises when I try to access the application with my phone (iPhone 5s): I get this blank page, whether I am using Chrome, Firefox, or Safari:
I should be able to see the navbar, even though the page has no content. A friend of mine uses an Android phone, and he got the same result.
It doesn't seem like there's a problem with the responsiveness since I can see the navbar with Chrome's developer tools:
Any idea?
Upvotes: 5
Views: 4011
Reputation: 109
As jsrobertouimet explains this is caused by seeing your app with Redux Devtools.
In my case my Store was still with Devtools
const store = createStore(
rootReducer,
compose(applyMiddleware(thunk),
window.__REDUX_DEVTOOLS_EXTENSION__ &&
window.__REDUX_DEVTOOLS_EXTENSION__())
);
To solve this I just deleted Redux Devtools extension code
const store = createStore(
rootReducer,
compose(applyMiddleware(thunk))
);
Also delete the Redux Devtools extension in your browser to see as in your phone or any other device.
Upvotes: 0
Reputation: 21
I know this is an old question, but I'll post the answer in case anyone needs it.
The problem is in your server.js (Backend) file. You need to put the middlewares in server.js in the following order.
Screenshot to show the order of the middlewares
Upvotes: 1
Reputation: 103
I realized I was using Redux Devtools in production also. The error was caused by the fact that I was seeing the application with browsers that didn't have the extension installed.
Upvotes: 1