You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix FOUC by moving stylesheets to head and disabling auto_load_bundle
Problem:
- Stylesheets were loading at bottom of body, causing FOUC with SSR
- Moving stylesheet_pack_tag to head failed because react_component
with auto_load_bundle=true would call append_stylesheet_pack_tag
during rendering, which must come before stylesheet_pack_tag
Solution:
- Set auto_load_bundle = false in react_on_rails config
- Manually specify required packs in layout (stimulus-bundle)
- Move stylesheet_pack_tag to head after append calls
- This ensures styles load before content renders, preventing FOUC
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments