Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
astralarya committed May 27, 2016
1 parent 40b013b commit 2691534
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@
Simple React console emulator

Inspired by [chrisdone/jquery-console](https://github.com/chrisdone/jquery-console).

## Example

```javascript
import ReactConsole from 'react-console';

let EchoPrompt = React.createClass({
echo: function(text) {
this.console.log(text);
this.console.return();
},
render: function() {
return <Console ref="console" handler={this.echo}/>;
}
});
```

0 comments on commit 2691534

Please sign in to comment.