| 33 | } |
| 34 | |
| 35 | type asyncState[T any] struct { |
| 36 | mu sync.RWMutex |
| 37 | data T |
| 38 | err error |
| 39 | loading bool |
| 40 | } |
| 41 | |
| 42 | // UseAsync runs an async function and returns (data, error, loading). |
| 43 | // Re-runs if the component re-mounts. Cancels on unmount via context. |
nothing calls this directly
no outgoing calls
no test coverage detected