useGenerate
HookAPI 2Runs context.generate for this component; see Generation. Unmounting cancels it.
| Signature | useGenerate(): Generation |
|---|
| Take it from | const { useGenerate } = Bundleware; |
|---|
Return Value
| Member | Type | Description |
|---|
busy | boolean | True while a run is in flight. |
result | GenerationResult | undefined | The last completed run's result. |
error | string | Why the last run failed, or ''. |
cancelled | boolean | True when the last run was cancelled, by cancel() or by the browser (for example on navigation). |
run(request) | Promise<GenerationResult | undefined> | Starts a run, superseding any in flight. Resolves undefined if it was superseded, cancelled or failed. |
cancel() | void | |
Availability
| Applicable versions | API 2 and higher |
|---|
| Bundleware | 0.3.0, build 2026.10.30 |
|---|