43 lines
728 B
Markdown
43 lines
728 B
Markdown
<!-- /docs/redux/thunks/database/locationDevice/fetchLocationDevicesThunk.md -->
|
|
|
|
# 🚚 fetchLocationDevicesThunk.js
|
|
|
|
Redux-AsyncThunk zum Abrufen aller Einträge aus der Tabelle `location_device`.
|
|
|
|
---
|
|
|
|
## 🔄 Zweck
|
|
|
|
Dieser Thunk ruft die Servicefunktion `fetchLocationDevicesService()` auf und liefert deren Ergebnis
|
|
an den Redux-Slice `locationDevicesSlice`.
|
|
|
|
---
|
|
|
|
## 🧠 Intern
|
|
|
|
```ts
|
|
createAsyncThunk("locationDevices/fetchAll", async () => {
|
|
return await fetchLocationDevicesService();
|
|
});
|
|
```
|
|
|
|
---
|
|
|
|
## ✅ Verwendung
|
|
|
|
```ts
|
|
dispatch(fetchLocationDevicesThunk());
|
|
```
|
|
|
|
---
|
|
|
|
## 📁 Pfad
|
|
|
|
```
|
|
/redux/thunks/database/locationDevice/fetchLocationDevicesThunk.js
|
|
```
|
|
|
|
---
|
|
|
|
[Zurück zur Übersicht](../../../../README.md)
|