Skip to content

Commit

Permalink
Fix jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
robwise committed Jan 27, 2016
1 parent b074e5d commit 94f3d6d
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
You can easily render React components in your JavaScript with `render` method that returns a [reference to the component](https://facebook.github.io/react/docs/more-about-refs.html) (virtual DOM element).

```js
// componentName - name of your registered component;
// props - Object which contains the properties to pass to the react object;
// elementId - id of an element where we render our React component;
/**
* ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
*
* Does this:
* ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}),
* document.getElementById('app'))
*
* @param name Name of your registered component
* @param props Props to pass to your component
* @param domNodeId
* @returns {virtualDomElement} Reference to your component's backing instance
*/
ReactOnRails.render(componentName, props, elementId)
```

Expand Down

0 comments on commit 94f3d6d

Please sign in to comment.