Closed damianobarbati closed 7 years ago
Is async supported?
export default class Component extends React.Component { constructor(props) { super(props); } componentWillMount() { const { dispatch } = this.props; dispatch(init()); } @autobind async compute () { const { dispatch } = this.props; let result = await dispatch(compute()); console.log('computed:', result); } render() { const props = this.props; return ( <div> <p>{props.fetching}</p> <p>{props.success}</p> <p>{props.failure}</p> <button type="button" onClick={this.compute} value={'Compute'} /> </div> ); } }
Yes it is. Sorry for the useless issue.
Is async supported?