Open
Description
Current Situation
Currently we utilize a decorator to allow for prevent_default
and stop_propogation
. But this syntax is pretty awkward.
@component
def LoginForm(props):
@reactpy.event(prevent_default=True, stop_propogation=True)
def handle_login(event):
...
Proposed Actions
Add callbacks to the event object which perform the same function, removing the need for a decorator.
@component
def LoginForm(props):
def handle_login(event):
event.prevent_default()
event.stop_propogation()
It might also make sense to convert our event
object from dict
to object
using Munch
, as the dot interface feels a bit more JavaScripty.