import React, { Component } from 'react' /* First we import the consumer */ import { CounterConsumer } from '../components/CounterProvider' export default class index extends Component { render () { return ( /* Then we use our context through render props */ {({ count, increase, decrease }) => (

Counter: {count}

)}
) } }