0

I want to mount my component use this code in Opal file:

Element['#wizard_param_grid_editor'].render do
   ZGrid(rows: @work_spaces)
End

I got the Error

Uncaught NoMethodError: undefined method render' for #]>

ylluminate
  • 12,102
  • 17
  • 78
  • 152
贾延平
  • 68
  • 3

1 Answers1

1

change require 'opal-jquery' before require 'reactive-ruby' fix this

贾延平
  • 68
  • 3
  • To explain precisely: Element is the Opal-jQuery wrapper. If React.rb detects that Element has been required, then it adds the "render" method to Element. This keeps react.rb and opal-jquery independent, but you have to remember to require opal-jquery first. – Mitch VanDuyn Dec 23 '15 at 17:17