Function useData

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

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