import { useState, createContext } from "react";
import Counter from "./Counter";

export let CounterContext = createContext() 


function CounterProvider() {
    let [counter, setCounter] = useState(0)

    return (
        <CounterContext.Provider value={{counter, setCounter}}>
            <Counter />
        </CounterContext.Provider>
    )
}

export default CounterProvider