@oneblink/apps-react
    Preparing search index...

    Function PendingSubmissionsContextProvider

    • React Component that provides the context for the usePendingSubmissions() hook to be used by components further down your component tree. It should only be included in your component tree once and ideally at the root of the application.

      import * as React from 'react'
      import {
        PendingSubmissionsContextProvider,
        usePendingSubmissions,
      } from '@oneblink/apps-react'
      
      function Component() {
        const pendingSubmissionsContext = usePendingSubmissions()
        // use pending submissions here
      }
      
      function App() {
        return (
          
            
          
        )
      }
      
      const root = document.getElementById('root')
      if (root) {
        ReactDOM.render(, root)
      }
      

      Parameters

      • props: {
            children: ReactNode;
            isPendingQueueEnabled: boolean;
            successNotificationTimeoutMs?: number;
        }
        • children: ReactNode

          Your application components

        • isPendingQueueEnabled: boolean

          true if pending queue is enabled, otherwise false. Can be used prevent offline submissions from being processed.

        • OptionalsuccessNotificationTimeoutMs?: number

          When a submission is processed successfully the isShowingSuccessNotification will be temporarily set to true, it will be set back to false after 5 seconds. This prop will allow you to customise how long to wait before hiding the notification with a milliseconds value.

      Returns Element