0
我試圖讓下面的代碼工作:如何生成多個DOM元素從react.rb組件
class HelloWorld < React::Component::Base
# stuff
def render
div { "hello" }
div { "goodby" }
end
end
,但我不斷收到此錯誤:
Exception raised while rendering #<HelloWorld:0x489> RuntimeError: a components render method must generate and return exactly 1 element or a string