uber-archive / r-dom

React DOM wrapper
MIT License
263 stars 18 forks source link

Adding an `is` prefix to the boolean param #3

Closed mishabosin closed 9 years ago

mishabosin commented 9 years ago

A small naming convention thing.

Looking forward to trying this tool!

cain-wang commented 9 years ago

That is consistent with other React API. Looks good to me.

Raynos commented 9 years ago

Why do you even have an isRendered boolean ?

Instead of r.div({ isRendered: isRendered }) you can literally do isRendered ? r.div() : null

The latter is terser and reduces the surface area of r

cain-wang commented 9 years ago

Yes, we can. Yet it's cleaner syntax wise. After all we are composing elements in declarative syntax, and a programmatic statement makes it messier.