This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=================================================================== | |
// File: circular_buffer.cpp | |
// | |
// Desc: A Circular Buffer implementation in C++. | |
// | |
// Copyright © 2019 Edwin Cloud. All rights reserved. | |
// | |
//=================================================================== | |
//------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
export const Context = React.createContext(null); | |
export const ContextProvider = ({ initialState, children }) => { | |
const [state, setState] = useState(initialState); | |
const providerActions = { | |
setState: values => | |
setState(prevState => { |
OlderNewer