erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
12.01k stars 2.5k forks source link

Add global variable at renderToString? #1248

Closed sauravskumar closed 7 years ago

sauravskumar commented 7 years ago

I am using https://github.com/hgoebl/mobile-detect.js for detecting mobile or desktop for render few components... I am setting this property (whether desktop or mobile) in the server.js file and want to pass down this value (desktop or mobile) to rest of the components. I am trying to add this value to the renderToString method... How can i access it in the child components in this starter kit? (For e.g. in App.js, Home.js)

Thank You in advance