Closed
Description
Help us help you! Have you looked for similar issues? Do you have reproduction steps? Contributing Guide
Steps to reproduce
To reproduce this issue, follow the basic installation steps described in the README using the latest version of react-rails (3.1.0 at the time of writing).
Expected behavior
Following the steps described in the README should allow the HelloWorld example component to render in a view.
Actual behavior
Rendering the view fails:
> rails s
=> Booting Puma
=> Rails 7.0.7 application starting in development
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.6.7 (ruby 3.1.2-p20) ("Birdie's Version")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 19068
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
Started GET "/" for 127.0.0.1 at 2023-08-20 20:15:25 -0400
Processing by HomeController#index as HTML
Rendering layout layouts/application.html.erb
Rendering home/index.html.erb within layouts/application
Rendered home/index.html.erb within layouts/application (Duration: 2.8ms | Allocations: 4135)
Rendered layout layouts/application.html.erb (Duration: 2.9ms | Allocations: 4247)
Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms | Allocations: 8205)
ActionView::Template::Error (uninitialized constant React::Rails::ComponentMount::Dummy
null_to_undefined: Dummy::Application.config.react.null_to_undefined_props
^^^^^):
2: <p>Find me in app/views/home/index.html.erb</p>
3:
4: <!-- erb: paste this in view -->
5: <%= react_component("HelloWorld", { greeting: "Hello from react-rails." }) %>
app/views/home/index.html.erb:5
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2023-08-20 20:21:16 -0400 ===
- Goodbye!
Exiting
System configuration
- Shakapacker or Sprockets version: 7.0.0
- React-Rails version: 3.1.0
- Rect_UJS version: 3.1.1
- Rails version: 7.0.7
- Ruby version: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
(Describe your issue here)
It appears that this issue is related to #1293. Specifically, I've traced the issue back here, where the issue seems to have been caught during a review of the PR (and yet, somehow still released).
Metadata
Metadata
Assignees
Labels
No labels