Closed iamdriz closed 5 months ago
I figured it out, seems you have to use render
on the component block itself:
def default
render ExampleComponent.new do |component|
component.render(AnotherExampleComponent.new)
end
end
I figured it out, seems you have to use
render
on the component block itself:def default render ExampleComponent.new do |component| component.render(AnotherExampleComponent.new) end end
How would you do this if you wanted to render two components within the ExampleComponent? For me the root of wanting to do this is not being able to have production find the preview html.erb file due to it being in the test folder.
We have a nested component in our views which will render both components (the inner component via
content
).However when doing the same in Lookbook previews, the inner component doesn't render:
Only the
ExampleComponent
renders in the preview and theAnotherExampleComponent
is ignored!How we get Lookbook to render the inner component?
Version numbers