Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-rails v3.1.0 is broken #1303

Closed
chtzvt opened this issue Aug 21, 2023 · 1 comment
Closed

react-rails v3.1.0 is broken #1303

chtzvt opened this issue Aug 21, 2023 · 1 comment

Comments

@chtzvt
Copy link

chtzvt commented Aug 21, 2023

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).

@justin808
Copy link
Collaborator

@chtzvt Please use 3.1.1.

paul-mesnilgrente added a commit to paul-mesnilgrente/react-rails-shakapacker-bug that referenced this issue Sep 21, 2023
paul-mesnilgrente added a commit to paul-mesnilgrente/react-rails-shakapacker-bug that referenced this issue Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants