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

There is #1292

Open aseem2625 opened 7 years ago

aseem2625 commented 7 years ago

While rendering style files are received after html. Hence, before each refresh of the page, it shows plain HTML of the page and then apply style from the received file.

So, my questions. 1) How to avoid this? There is react-inline-css plugin listed in package.json in the repository though it's not being used be existing components. How can I use it in the existing boilerplate?

Also, IMHO, using the way to mention className as className={styles.classA} is of no benefit, I guess. I could simply have require/import the file in the jsx file and added classes simply like className='classA'

2) Since, there isn't any caching mechanism in the boilerplate, how to add it?

Thanks

vladinator1000 commented 7 years ago

For the style question, check around the 40th min of this video: https://www.youtube.com/watch?v=uDGR2k8Nfyc