I am toying with react.js. I created a simple-minded app It works on my desktop and on my android tablet, but I get a blank page, nothing else, on my phone, whether in the Android browser or in Firefox.
And yes, I did add the required
React.initializeTouchEvents(true);
Any ideas? Thanks.
The <script>
tag that includes your JS, main.js, is inside document.body
but is also rendering your React component to document.body
and overwriting itself. Try rendering to the container you provided and see if that fixes it:
Current:
React.renderComponent(RotationContainer( {data:DATA} ), document.body);
Change to render to #content
:
React.renderComponent(
RotationContainer( {data:DATA} ),
document.querySelector("#content")
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With