@sassoftware/cra-template-viya-app-quickstart
Version:
Template for typical SAS Viya Applications
14 lines (12 loc) • 429 B
JavaScript
/*
* Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import React from 'react';
import AppContext from './AppContext';
function withAppContext(Component) {
return function WrapperComponent(props) {
return <AppContext.Consumer>{(state) => <Component {...props} context={state} />}</AppContext.Consumer>;
};
}
export default withAppContext;