Component Children, Keys and Fragments
Children
DIV(id: 1) do
SPAN(class: :span_1) { 'hi' }
SPAN(class: :span_2) { 'there' }
end<div id=1>
<span class='first_span'>hi</span>
<span class='second_span'>there</span>
</div>Dynamic Children
# assume text is a string of text
UL do
word_count(text).each_with_index do |word, count|
LI { "#{count} - #{word}" }
end
endKeys
Rendering Children
Rendering Multiple Values and the FRAGMENT component
Last updated
Was this helpful?