8base App Provider
Universal 8base App Provider loads fragments schema and provides Apollo client with it, authentication and table schema.
API
Table of Contents
EightBaseAppProvider
EightBaseAppProvider
universal provider which loads fragments schema and provides Apollo client with it, authentication and table schema.
Properties
uri
string? The 8base API field schema.children
Function? The render function.
Usage
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { EightBaseAppProvider } from '@8base/app-provider';
import { EightBaseBoostProvider, Loader } from '@8base/boost';
import { Routes } from './routes';
const Application = () => (
<BrowserRouter>
<EightBaseBoostProvider>
<EightBaseAppProvider uri={ process.env.REACT_APP_8BASE_API_URL }>
{
({ loading }) => loading ? <Loader /> : <Routes />
}
</EightBaseAppProvider>
</EightBaseBoostProvider>
</BrowserRouter>
);
export { Application };