-
Notifications
You must be signed in to change notification settings - Fork 752
Closed
Labels
Description
Steps to reproduce
Render any component with prerender: true
.
I've created this sample Rails app to reproduce the issue:
https://github.com/tf/react-rails-2-7-ssr-bug
Expected behavior
HTML is generated.
Actual behavior
Server side executed JS causes:
TypeError: Cannot read properties of undefined (reading 'version')
System configuration
- Sprockets version: 4.2
- React-Rails version: 2.7
- Rect_UJS version: ?
- Rails version: 7
- Ruby version: 2.7
Probably caused by this line: https://github.com/reactjs/react-rails/pull/1269/files#diff-46071864dd030eabbafccec157424caade6e2c3b0f30ebaf9f4fd3f224377216R3
Maybe ReactDOM
is not present in server context?
ahangarha