最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ReactJS app doesn't work on mobile - Stack Overflow

programmeradmin0浏览0评论

I deployed my app to heroku, and it works perfectly on desktop, but it seems like bundle.js doesn't start on mobile, it stacks on preloader. I used React + Redux, react-router. fetch requests I have replaced with axios, but it still doesn't work. Who has such an experience or knows how to debug website on mobile, get console logs?

Update

also doesn't work in Firefox. It logs that 'r' in undefined in minimized script. seems like webpack do something wrong in minimizing. suspiciously works in chrome...

Update 2

Don't forget to delete redux dev debugger when deploying your apps :)

I deployed my app to heroku, and it works perfectly on desktop, but it seems like bundle.js doesn't start on mobile, it stacks on preloader. I used React + Redux, react-router. fetch requests I have replaced with axios, but it still doesn't work. Who has such an experience or knows how to debug website on mobile, get console logs?

Update

also doesn't work in Firefox. It logs that 'r' in undefined in minimized script. seems like webpack do something wrong in minimizing. suspiciously works in chrome...

Update 2

Don't forget to delete redux dev debugger when deploying your apps :)

Share Improve this question edited Dec 26, 2016 at 17:04 Alexanderswed asked Dec 26, 2016 at 15:41 AlexanderswedAlexanderswed 711 silver badge3 bronze badges 3
  • which mobile browser are you using? – azium Commented Dec 26, 2016 at 16:10
  • chrome for android – Alexanderswed Commented Dec 26, 2016 at 16:12
  • @azium here is the link – Alexanderswed Commented Dec 26, 2016 at 16:14
Add a ment  | 

1 Answer 1

Reset to default 9

It looks like your app breaks in browsers that don't have "Redux DevTools Extension" installed.

According to the documentation your store setup should look like this:

import { createStore, applyMiddleware, pose } from 'redux';

const poseEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || pose;
const store = createStore(reducer, preloadedState, poseEnhancers(
  applyMiddleware(thunk)
));

In your code you are not using the customised pose function returned from the extension.

发布评论

评论列表(0)

  1. 暂无评论