airbnb / react-with-styles

Use CSS-in-JavaScript with themes for React without being tightly coupled to one implementation
MIT License
1.7k stars 95 forks source link

Issues with HMR #36

Open toddw opened 7 years ago

toddw commented 7 years ago

When using react-with-styles and hot-module-replacement, the styles object passed in by props is not updating without a full page refresh.

lencioni commented 7 years ago

Thanks for the report! I'd be happy to review a PR that fixes this.

mikefowler commented 7 years ago

@toddw, I recently upgraded a personal project to use React Hot Loader 3 (upgrade example) and react-with-styles does seem to be working with HMR. Maybe give that a shot?

scho7623 commented 6 years ago

I'm facing the same issue as @toddw. Styling directly with aphrodite, hot module replacement (HMR) works as expected, and updates the style, but with react-with-styles, HMR seems to be broken and styles prop is not getting updated, thus not updating style as expected. Does react-with-styles do anything special to handle HMR? Or is something out of react-with-styles broken?