PluginProbe
SchedulePress – Auto Post & Publish, Auto Social Share, Schedule Posts with Editorial Calendar & Missed Schedule Post Publisher / trunk
SchedulePress – Auto Post & Publish, Auto Social Share, Schedule Posts with Editorial Calendar & Missed Schedule Post Publisher vtrunk
5.3.3 5.3.2 5.3.1 5.3.0 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.10 5.2.11 5.2.12 5.2.13 5.2.14 5.2.15 5.2.16 5.2.17 5.2.18 5.2.2 5.2.3 5.2.4 All 117 releases
wp-scheduled-posts / src / context / AppContext.js

AppContext.js in SchedulePress – Auto Post & Publish, Auto Social Share, Schedule Posts with Editorial Calendar & Missed Schedule Post Publisher trunk, at src/context/AppContext.js

16 lines 409 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { createContext, useReducer } from 'react';
2 import AppReducer from './AppReducer';
3 import initialState from './initialState';
4
5 export const AppContext = createContext();
6
7 export const AppProvider = ({ children }) => {
8 const [state, dispatch] = useReducer(AppReducer, initialState);
9
10 return (
11 <AppContext.Provider value={{ state, dispatch }}>
12 {children}
13 </AppContext.Provider>
14 );
15 };
16