@@ -16,8 +16,8 @@ components that just works.
1616> launching into Redraw, you should take a look at Lustre, it provides a
1717> user-friendly, awesome experience right out-of-the-box for every gleamlins!
1818>
19- > As a bonus, Lustre is homomorphic , i.e. it can be used as well on client and
20- > on server with the same codebase!
19+ > As a bonus, Lustre is isomorphic , i.e. it can be used as well on client and on
20+ > server with the same codebase!
2121>
2222> Redraw assumes you have minimal knowledge on frontend development, and will
2323> neither try to ease your learning curve nor simplify and hide the frontend
@@ -125,8 +125,8 @@ difference: wrap the component in `use <- redraw.component()`!
125125
126126``` gleam
127127import redraw
128- import redraw/attribute
129- import redraw/html
128+ import redraw/dom/ attribute
129+ import redraw/dom/ html
130130
131131pub fn gleam_is_awesome() {
132132 use <- redraw.component__("GleamIsAwesome")
@@ -142,14 +142,14 @@ component_.
142142
143143``` gleam
144144import redraw
145- import redraw/attribute
146- import redraw/html
147- import redraw_dom/client
145+ import redraw/dom/ attribute
146+ import redraw/dom/client
147+ import redraw/dom/html
148148
149149pub fn main() {
150150 let root = root()
151- client.create_root("root")
152- |> client.render(redraw.strict_mode([root()]))
151+ let assert Ok(root) = client.create_root("root")
152+ client.render(root, redraw.strict_mode([root()]))
153153}
154154
155155fn root() {
@@ -190,7 +190,7 @@ pub type CounterProps {
190190pub fn counter() {
191191 use props: CounterProps <- react.component_("Counter")
192192 html.button(
193- [h .on_click(fn(_) { props.set_count(fn(count) { count + 1 }) })],
193+ [events .on_click(fn(_) { props.set_count(fn(count) { count + 1 }) })],
194194 [html.text("count is " <> int.to_string(props.count))],
195195 )
196196}
@@ -204,7 +204,7 @@ pub type CounterProps = #(Int, fn(fn(Int) -> Int) -> Nil)
204204pub fn counter() {
205205 use #(count, set_count): CounterProps <- react.component_("Counter")
206206 html.button(
207- [h .on_click(fn(_) { set_count(fn(count) { count + 1 }) })],
207+ [events .on_click(fn(_) { set_count(fn(count) { count + 1 }) })],
208208 [html.text("count is " <> int.to_string(count))],
209209 )
210210}
@@ -281,7 +281,7 @@ of optionals.
281281``` gleam
282282import gleam/option.{type Option}
283283import redraw
284- import redraw/html
284+ import redraw/dom/ html
285285
286286// This type will be converted to correct JS props.
287287pub type ExternalComponentProps {
0 commit comments