docs: clarify rx.event on class-level handlers
HA
1d ago+16+16+01234567890123456789-1-1-0123456789
Summary
- Explain that stacked
@rx.eventdecorators operate on the same function. Type checkers can also accept passing a decorated state method read from its class back torx.event. That call raisesTypeErrorat runtime. - Show how to configure an existing handler for a trigger with
.throttle().
This follows the documentation option in #8000. Narrower signatures could reject valid calls with annotated Callable arguments or still accept invalid calls in one checker.
Closes #8000
Testing
- 170 event unit tests passed.
- Pyright passed on
tests/type_checkingfor Python 3.11 and 3.14. The ty suite passed for Python 3.14. - Verified that
.throttle(500)sets the action on the resulting event spec. - Confirmed the runtime behavior for state methods and decentralized event functions.