Skip to content Skip to sidebar Skip to footer

React : Application Works On Desktop But On Mobile A Blank Page Is Shown

I've made this app with React: Live-Demo here: http://n-or.de/simple-calculator/ It works well on desktop but on mobile the actual app isn't visible. One just sees the background

Solution 1:

Just open the app with a browser console and you will see an error message (or open it on Safari on the desktop):

SyntaxError: Unexpected identifier 'item'

That is caused by let item = this.refs.inputElement;. Not all browsers support ES6 just yet. You have to transpile ES6 to ES5 using Babel or Google Traceur.

Solution 2:

The issue seems to be caused by the fact that the mobile browsers that you have tested are not able to read some of the css properties you have specified. Adding vendor prefixes should solve the problem.

For example, at the moment your pages render fine on an Android phone when using Chrome browser, but when using the Samsung stock internet browser only the gradient background can be seen.

Post a Comment for "React : Application Works On Desktop But On Mobile A Blank Page Is Shown"