Skip to content

ntcore-ts / @ntcore-ts/react / UseTopicResult

Type Alias: UseTopicResult<T> ​

UseTopicResult<T> = object

Defined in: react/src/lib/use-topic.ts:41

Result of useTopic. When you pass publish, setValue is defined and you must wait for isReadyToWrite before calling it.

Type Parameters ​

T ​

T = NetworkTablesTypes

Properties ​

error ​

error: Error | null

Defined in: react/src/lib/use-topic.ts:47

Last publish or setValue error, if any.


isReadyToWrite ​

isReadyToWrite: boolean

Defined in: react/src/lib/use-topic.ts:45

True once the server has acknowledged our publish request. Only check this when you passed publish.


setValue ​

setValue: ((value) => void) | undefined

Defined in: react/src/lib/use-topic.ts:43


value ​

value: T | null

Defined in: react/src/lib/use-topic.ts:42

Released under the MIT License.