MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / UseId

Function UseId

tsunami/app/hooks.go:84–90  ·  view source on GitHub ↗

UseId returns the underlying component's unique identifier (UUID). The ID persists across re-renders but is recreated when the component is recreated, following React component lifecycle. This hook must be called within a component context.

()

Source from the content-addressed store, hash-verified

82// is recreated, following React component lifecycle.
83// This hook must be called within a component context.
84func UseId() string {
85 rc := engine.GetGlobalRenderContext()
86 if rc == nil {
87 panic("UseId must be called within a component (no context)")
88 }
89 return engine.UseId(rc)
90}
91
92// UseRenderTs returns the timestamp of the current render.
93// This hook must be called within a component context.

Callers

nothing calls this directly

Calls 2

GetGlobalRenderContextFunction · 0.92
UseIdFunction · 0.92

Tested by

no test coverage detected