Skip to content

Instantly share code, notes, and snippets.

@devalexandre
Created March 28, 2018 12:28
Show Gist options
  • Save devalexandre/0d30f5ad5c805c423c3fbe93d3d187de to your computer and use it in GitHub Desktop.
Save devalexandre/0d30f5ad5c805c423c3fbe93d3d187de to your computer and use it in GitHub Desktop.
contador.js 9:11 error Expected an assignment or function call and instead saw an expression no-unused-expressions
import React, { Component } from 'react';
import { AppContext } from '../context/app';
class Contador extends Component {
render() {
return (
<AppContext.Consumer>
{context => {
<div>
<p>contador : {context.state.count}</p>
<button onClick={context.incrementState}>increment</button>
</div>;
}}
</AppContext.Consumer>
);
}
}
export default Contador;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment