PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /proc/self/cwd/wp-content/plugins/checkout-plugins-stripe-woo/wizard/src/Store/
Upload File :
Current File : //proc/self/cwd/wp-content/plugins/checkout-plugins-stripe-woo/wizard/src/Store/StateProvider.js

import React, { createContext, useContext, useReducer } from 'react';

// Prepare a dataLayer
export const StateContext = createContext();

// Wrap our app and provide the Data layer
export const StateProvider = ( { reducer, initialState, children } ) => (
	<StateContext.Provider value={ useReducer( reducer, initialState ) }>
		{ children }
	</StateContext.Provider>
);

// Get information from the data layer
export const useStateValue = () => useContext( StateContext );

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic