schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

Experiencing CSS/iScroll Load racing issue #34

Open iDVB opened 7 years ago

iDVB commented 7 years ago

I narrowed things down to something to do with chunk-injecting the css in webpack. If I use ExtractTextPlugin and all the css goes into a single file, everything works fine. But if I don't use that, and it blobs each css in, it does not work "on first load" ...works fine after that.

Additionally, if I put inline style on the parent item around the then that works too.

I'm curious why that makes a difference.... doesn't the CSS always load 100% before the JS does?