levand / quiescent

A lightweight ClojureScript abstraction over ReactJS
Eclipse Public License 1.0
613 stars 46 forks source link

Documentation incorrect #42

Closed jdeisenberg closed 8 years ago

jdeisenberg commented 9 years ago

At quiescent/docs.md in the section titled "Rendering", this code

(render (Hello {:fname "Ned" :lname "Stark"}
           (.getElementById js/document "hello-div")))

Should be

(q/render (Hello {:first-name "Ned" :last-name "Stark"})
           (.getElementById js/document "hello-div"))

Also, for consistency, the preceding section's defcomponent should be q/defcomponent

levand commented 9 years ago

Thanks, I'll fix this next time I'm updating the docs.

levand commented 8 years ago

Actually, I think this is fine as-is. This is a small context-less snippet, and the surrounding prose clearly indicates that the render function belongs in the quiescent.core namespace.

If I changed this snippet, I would want to change all the snippets in the examples to use namespaces pervasively, and I think that would hurt their clarity.

Thanks for the feedback, though! I'll keep this in mind for future documentation, to avoid this type of confusion as best I can.