gistda-sphere-react

SphereProvider

Root provider that loads the Sphere API script

<SphereProvider apiKey="YOUR_API_KEY" onLoad={() => console.log('API loaded')}>
  {/* Your app */}
</SphereProvider>

Props

PropTypeRequiredDefaultDescription
apiKeystringYes-Your GISTDA Sphere API key
childrenReactNodeYes-Child components
scriptUrlstringNoOfficial Sphere API URLCustom URL for the Sphere API script
onLoad() => voidNo-Called when the API script finishes loading
onError(error: Error) => voidNo-Called if the API script fails to load

On this page