Skip to content

Commit e1c217d

Browse files
committed
docs
1 parent 9c78da6 commit e1c217d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,31 @@ $effect(() => {
169169
></video>
170170
```
171171

172+
### useMachineStatus
173+
174+
Wraps `robotClient.getMachineStatus()` in a reactive query at the ViamProvider level.
175+
176+
```svelte
177+
<script lang="ts">
178+
import { useMachineStatus } from '@viamrobotics/svelte-sdk';
179+
180+
interface Props {
181+
partID: string;
182+
}
183+
184+
let { partID }: Props = $props();
185+
186+
const machineStatus = useMachineStatus(() => partID);
187+
188+
$inspect(machineStatus.current);
189+
$inspect(machineStatus.error);
190+
$inspect(machineStatus.fetching);
191+
</script>
192+
```
193+
172194
### useResourceNames
173195

174-
Wraps `client.resourceNames()` in a reactive query. Supports optional filtering by resource subtype.
196+
Wraps `robotClient.resourceNames()` in a reactive query at the ViamProvider level. Supports optional filtering by resource subtype.
175197

176198
```svelte
177199
<script lang="ts">

0 commit comments

Comments
 (0)