We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4192c30 commit 302d4c0Copy full SHA for 302d4c0
ruby/hyper-component/spec/client_features/component_spec.rb
@@ -237,6 +237,23 @@ class Foo < Hyperloop::Component
237
expect(page).to have_content("paramchildparamchild")
238
end
239
240
+ it 'can receive and render a component class' do
241
+ mount 'Baz' do
242
+ class Bar < Hyperloop::Component
243
+ param :p
244
+ render { @P.span }
245
+ end
246
+ class Foo < Hyperloop::Component
247
+ param :c
248
+ render { @C.insert_element(p: 123) }
249
250
+ class Baz < Hyperloop::Component
251
+ render { Foo(c: Bar) }
252
253
254
+ expect(page).to have_content("123")
255
256
+
257
it 'has a class components method' do
258
mount 'Foo' do
259
class Bar < Hyperloop::Component
0 commit comments