react-class-component-hooks

0.2.0 • Public • Published

react-class-component-hooks

React Class Component Hooks

NPM JavaScript Style Guide

Install

npm install --save react-class-component-hooks

Usage

import React, { Component } from 'react'
 
import {UseEffect} from 'react-class-component-hooks'
 
class Example extends Component {
  state = {updateUsers: []}
  render () {
    return (
      <UseEffect watches={[this.props.users]} onUpdate={() => this.setState({updateUsers: this.props.users})} />
    )
  }
}

License

MIT © myckhel

Readme

Keywords

none

Package Sidebar

Install

npm i react-class-component-hooks

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

5.66 kB

Total Files

7

Last publish

Collaborators

  • myckhel