Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 483 Bytes

README.md

File metadata and controls

28 lines (25 loc) · 483 Bytes

any-component

Provides either "react", "preact", "inferno" h() and Component class to build library-agnostic components.

Installation

$ npm install --save any-component

OR

$ yarn add any-component

Usage

const { h, Component } = require('any-component');

/** @jsx h */
class MyComponent extends Component {
    render(props) {
        return (
            <div>
                { props.children }
            </div>
        )
    }
}