react-class-component-hooks
v0.2.0
Published
React Class Component Hooks
Downloads
5
Readme
react-class-component-hooks
React Class Component Hooks
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