@equinor/videx-3d
    Preparing search index...

    Function useData

    • Access the store from the DataProvider within a component to retrieve data.

      Returns Store | null

      const store = useData()
      

      Use the store in a useEffect hook to retrieve the data you need and save it to a local state (if required)

      useEffect(() => {
      if (store) {
      store.get<WellboreHeader>('wellbore-headers', id).then(response => {
      ... // do something with the data
      })
      }
      }, [store, id])

      Data