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.
()
| 82 | // is recreated, following React component lifecycle. |
| 83 | // This hook must be called within a component context. |
| 84 | func 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. |
nothing calls this directly
no test coverage detected