Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegomura/react-log
React for the Console
https://github.com/diegomura/react-log
dom log logging react
Last synced: 3 days ago
JSON representation
React for the Console
- Host: GitHub
- URL: https://github.com/diegomura/react-log
- Owner: diegomura
- License: other
- Created: 2016-07-18T21:21:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T17:27:28.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T20:34:20.932Z (2 months ago)
- Topics: dom, log, logging, react
- Language: JavaScript
- Homepage: https://diegomura.github.io/react-log/
- Size: 18.4 MB
- Stars: 575
- Watchers: 10
- Forks: 27
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)