File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff 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">
You can’t perform that action at this time.
0 commit comments