https://github.com/dawee/human-component
A human readable version of React Components
https://github.com/dawee/human-component
Last synced: 3 months ago
JSON representation
A human readable version of React Components
- Host: GitHub
- URL: https://github.com/dawee/human-component
- Owner: dawee
- Created: 2016-06-21T16:45:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-19T09:48:34.000Z (about 10 years ago)
- Last Synced: 2025-10-19T01:54:39.121Z (9 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# human-component
A human readable version of React Components
## Convert tag names
```js
const Human = require('human-component');
const div = Human.from('div');
const span = Human.from('span');
```
## Require React.Component
```js
const Human = require('human-component');
const Paper = Human.from('material-ui/Paper');
const TableRow = Human.require(module, 'material-ui/Table', 'TableRow');
```
## Render tree
```js
class MyComponent extends React.Component {
render() {
return (
Paper.el({width: 100},
div.el(null,
span.el(null, 'Lorem'),
span.el(null, 'Ipsum')
),
)
);
}
}
```