react-inject-props-decorator
v1.3.3
Published
ES7 decorator to inject props in your react component methods
Downloads
2
Readme
react-inject-props-decorator
ES7 decorator to inject props in your react component methods.
Install
$ npm i -S react-inject-props-decorator
or
$ yarn add react-inject-props-decorator
Example
import React, { Component } from 'react';
import injectProps from 'react-inject-props-decorator';
class HelloUser extends Component {
@injectProps
render({firstName, lastName}) {
return (
<div>Hello {firstName} {lastName}</div>
)
}
}