First off, thanks so much for creating this starter kit, it looks awesome!
I booted it up in dev and noticed every page refresh shows about 500ms of unstyled HTML. Is anyone else experiencing this? Any tips to prevent this?
I also experience this but until now I dont take it serious because it only happens in dev mod.
I think it's because of inline styles that rendered on client. Server cannot handle css unless you use webpack-isomorphic-tools package. This package is used in react-redux-isomorphic-app by erikras.
Yup, only happens in DEV as @ZeroCho explained. Even with a massive background-image, zero hiccups w/ rendering on Heroku. Really smooth w/ <ReactCSSTransitionGroup> too, was thinking of creating a PR for that, and also to add react-router-scroll (so pages don't load 1/2 way scrolled down).
This is more on the rookie side-of-things, but also beware of default State, sometimes you'll see a flicker of text and realize you just need to tweak your display logic a little bit to keep it clean until a fetch completes, or whatever..
_EDIT:_ There is a re-render that does take place initially on a refresh in PROD. Not entirely sure what causes this... I think it might have to do with <ReactCSSTransitionGroup transitionAppear={true}> - Somehow the payload finishes loading (Chrome DevTools 禄 Network tab), and then the transition-animation fires again (like it loaded a second time)... Can anyone else confirm?
_EDIT 2:_ Alas, this was happening because I was wrapping nested <ReactCSSTransitionGroup> blocks. Carry on...
This is happening to me in production. Any reason why?
This happens to me in production mode as well. When main.css only gets added to <head> after JS runs...
Ah, I've identified my issue. If you run npm run start after running npm run dev, your files in public/assets will be still be in dev mode. This will cause FOUC.
Other webpack noobies like me might have similar problems in the future. Perhaps we can make webpack build in different folders within public depending on the stage? So webpack.config.prod.js will build in public/prod/assets and webpack.config.dev.js build in public/dev/assets? Alternatively, could we make npm run start build prior to actually starting?
@rclmenezes This makes sense.
@choonkending This can be solved by adding npm prestart script
Alternatively, could we make npm run start build prior to actually starting?
I like this idea! Sorry for the lack of clearer documentation - we're working towards a better + cleaner repository so hopefully a lot of the configuration will become simpler over time.
This can be solved by adding
npm prestartscript
Did not know this even existed lol. Sure I think we should add that in!
We're cleaning up issues on the project and since this is an old issue we're closing it. Moreover, the code has changed quite a lot since this issue was opened.
If you still experience this or have an issue, please comment here or open a new one