Function IsOfflineContextProvider

  • IsOfflineContextProvider is a React Component that provides the isOffline state for components further down your component tree to consume. It should be used to wrap the components requiring the state.

    • This component is required in your component tree to be able to consume the useIsOffline hook.

    Usage

    import { IsOfflineContextProvider } from '@oneblink/apps-react'

    const TopLevelComponent = () => {
    return (
    <IsOfflineContextProvider>
    <div>
    <ComponentThatRequiresOfflineState />
    </div>
    </IsOfflineContextProvider>
    )
    }

    export default TopLevelComponent

    Parameters

    • props: {
          children: ReactNode;
      }
      • children: ReactNode

    Returns Element