Component API
Response
class SomeComponent < Matestack::Ui::Component
def response
div id: "my-component" do
plain "hello world!"
end
SomeOtherComponent.()
end
endclass ExamplePage < Matestack::Ui::Page
def response
div id: "div-on-page" do
SomeComponent.()
end
end
endPartials and helper methods
Local partials on component level
Partials defined in modules
Helper methods
Render?
Prepare
Params access
Passing data to components
General options access
Optional and required options
Required options
Optional options
Passing more complex data structures to components
Alias properties
Text argument
Yielding inside components
Slots
Slots on the page instance scope
Using slots of components within components
Calling slots with params
Last updated
Was this helpful?