|
|
|
|
|
by joeldrapper
1204 days ago
|
|
Ruby has blocks, so in Phlex, you’d write it like this using methods and keyword arguments. div(class: "example") do
h1(id: "heading") { "This is an example" }
h2 { "creating React markup" }
AnotherComponent(foo: "bar") do
li { a(href: "http://whatever.com") { "One list item" } }
li do
text " Another list item"
hr
end
end
end
|
|