Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/diegomura/react-log

React for the Console
https://github.com/diegomura/react-log

dom log logging react

Last synced: 27 days ago
JSON representation

React for the Console

Awesome Lists containing this project

README

        

React for the Console

[![npm](https://img.shields.io/npm/v/react-log.svg)](https://www.npmjs.com/package/react-log)
[![Travis](https://img.shields.io/travis/diegomura/react-log.svg)](https://travis-ci.org/diegomura/react-log)
[![license](https://img.shields.io/github/license/diegomura/react-log.svg)](https://github.com/diegomura/react-log/blob/master/LICENSE)

## Install
```sh
yarn add react-log
```
or
```sh
npm install react-log --save
```

## Usage
_react-log_ exports a single React Component called _Log_. Each child will not be rendered on the DOM, but will produce an analog representation on the console.

No proprietary syntax is needed for child HTML elements. _react-log_ handles the parsing and rendering of native React-DOM elements for you.

Let's see it in action!

### Example

```jsx
import Log from 'react-log';


React

log



For more info

```
[See full example](https://github.com/diegomura/react-log/blob/master/examples/index.js)

#### Output
![banner](https://user-images.githubusercontent.com/5600341/32155421-008b99dc-bd16-11e7-8ac4-13f094577b7e.png)

#### Run the example yourself
On the root of the project:

```sh
cd examples/
npm install
npm start
```

The server should be listening now on `http://localhost:8080`

## Browser Support
Tested and working on Chrome 51 and Firefox 45.
Does not work on Safari or IE as far I've seen. Yet.

## License

MIT © [Diego Muracciole](http://github.com/diegomura)