Cable Component API
import MatestackUiCore form 'matestack-ui-core';
consumer.subscriptions.create("MatestackUiCoreChannel", {
//...
received(data) {
MatestackUiCore.eventHub.$emit(data.event, data)
}
});class Page < Matestack::Ui::Page
def response
cable id: 'foo' [...] do
# this block will be rendered as initial content and may be
# modified on the client side later upon receiving defined events
DummyModel.all.each do |instance|
ListComponent.(item: instance)
end
end
end
endParameters
id - required
append_on
prepend_on
replace_on
update_on
delete_on
Last updated
Was this helpful?