From 2f63be88239fd45600f4ff9d418301f33efbb7a8 Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Fri, 21 Feb 2014 17:16:26 +0100 Subject: [PATCH] Update Readme for 0.4.0 --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0485266..baff3c0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ to the *:compiler* section of project.clj, as shown in the examples directory (or "reagent/react.min.js" in production). You could also add - + directly to your html. @@ -49,12 +49,11 @@ You can use one component inside another: And pass properties from one component to another: ```clj -(defn child [props] - [:p "Hi, I am " - (:name props)]) +(defn child [name] + [:p "Hi, I am " name]) (defn childcaller [] - [child {:name "Foo"}]) + [child "Foo Bar"]) ``` You mount the component into the DOM like this: @@ -102,7 +101,7 @@ But you can still use them if you want to, either using `reagent.core/create-cla ```clj (def my-html (atom "")) -(defn plain-component [props this] +(defn plain-component [] [:p "My html is " @my-html]) (def component-with-callback