indicate[Event]
Reference
indicateClick={IndicatorSignal}
Brisa extends all the HTML element events (onInput, onMouseOver, onTouchStart...) to allow to control the pending status of the server action by replacing the on prefix to indicate.
The value is the generated IndicatorSignal by the indicate method:
- Read more docs about
indicatein Server Components. - Read more docs about
indicatein Web Components.
const indicator = indicate('some-action-name')
// ...
<input
type="text"
onInput={(e) => console.log(e.target.value)}
indicateInput={indicator} // IndicatorSignal
debounceInput={300}
/>
In this example, we are registering the indicator in the onClick server action through the indicate[Event] attribute.
Parameters:
IndicatorSignal- Indicator signal generated byindicatemethod.
This
indicate[Event]attribute is only implemented in server components, because the server actions are only in server components.
More docs
For more details, take a look to:
indicatemethod in server components.indicatemethod in web components.indicatorHTML extended attribute to use it in any element of server/web components.
Support
| Component | Support |
|---|---|
| Server Component | โ |
| Web Component | โ |
| SSR Web Component | โ |