Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
add denote all optional arguments in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawson Botsford committed Jul 11, 2016
1 parent 129bae8 commit f4d41e3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,23 @@ module.exports = React.createClass({

## Documentation

#### `r[tag]([properties], children)`
#### `r[tag]([properties], [children])`

Returns a React element

- **tag** `String` - A React.DOM tag string
- **properties** `Object` - An object containing the properties you'd like to set on the element. Defaults to `{}`.
- **children** `Array|String` - An array of `r` children or a string. This will create child elements or a text node, respectively.
- **properties** `Object` *optional* - An object containing the properties you'd like to set on the element.
- **children** `Array|String` *optional* - An array of `r` children or a string. This will create child elements or a text node, respectively.

#### `r(component, [properties], children)`
#### `r(component, [properties], [children])`

Returns a React element

- **component** `Function` - A React.js Component class created with `React.createClass`
- **properties** `Object` - An object containing the properties you'd like to set on the element. Defaults to `{}`.
- **children** `Array|String` - An array of `r` children or a string. This will create child elements or a text node, respectively.
- **properties** `Object` *optional* - An object containing the properties you'd like to set on the element.
- **children** `Array|String` *optional* - An array of `r` children or a string. This will create child elements or a text node, respectively.

#### Special Properties

- **isRendered** `"Boolean"` - If falsy, React will skip rendering the target component.

- **classSet** `Object` - Apply [classnames](https://www.npmjs.com/package/classnames) and assign to className.
- **isRendered** `"Boolean"` *optional* - If falsy, React will skip rendering the target component.
- **classSet** `Object` *optional* - Apply [classnames](https://www.npmjs.com/package/classnames) and assign to className.

0 comments on commit f4d41e3

Please sign in to comment.