Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit be90e87

Browse files
committed
Fix README
1 parent 3366f19 commit be90e87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,21 @@ Not a fan of using element building DSL? Use file extension `.jsx.rb` to get JSX
142142
# app.jsx.rb
143143
class Fancy
144144
def render
145-
React.create_element('div') { "fancy" }
145+
`<div>"this is fancy"</div>`
146146
end
147147
end
148148

149149
class App
150150
include React::Component
151151

152152
def render
153-
%x{
153+
element = %x{
154154
<div>
155155
<h1>Outer</h1>
156156
<Fancy>{ #{5.times.to_a.join(",")} }</Fancy>
157157
</div>
158158
}
159+
element
159160
end
160161
end
161162

0 commit comments

Comments
 (0)