ntcore-ts / @ntcore-ts/react / UseProtobufTopicResult
Type Alias: UseProtobufTopicResult<T>
UseProtobufTopicResult<
T> =object
Defined in: react/src/lib/use-protobuf-topic.ts:34
Result of useProtobufTopic. When you pass publish, setValue is defined and you must wait for isReadyToWrite before calling it.
Type Parameters
T
T extends object
Properties
error
error:
Error|null
Defined in: react/src/lib/use-protobuf-topic.ts:40
isReadyToWrite
isReadyToWrite:
boolean
Defined in: react/src/lib/use-protobuf-topic.ts:39
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-protobuf-topic.ts:37
value
value:
ReadonlyValue<T> |null
Defined in: react/src/lib/use-protobuf-topic.ts:36
Shared with every subscriber of the topic, so it is read-only.