idyll-component

1.2.2 • Public • Published

idyll-component

Extensible component to be used in idyll projects

Installation

npm install --save idyll-component

Usage

const React = require('react');
const IDLComponent = require('../idl-component');
 
class CustomComponent extends IDLComponent {
  constructor(props) {
    super(props);
  }
 
  handleClick() {
    ...
    this.updateProps({
      prop1: newProp1
    });
  }
 
  render() {
 
    return (
      <div prop1={this.props.prop1} >
        {...}
      </div>
    )
  }
}
 
CustomComponent.defaultProps = {
  ...
}
 
module.exports = CustomComponent;

Readme

Keywords

Package Sidebar

Install

npm i idyll-component

Weekly Downloads

1

Version

1.2.2

License

MIT

Last publish

Collaborators

  • bclinkinbeard
  • mathisonian