reflex
reflex copied to clipboard
Uncaught JS Error : Passing a var instead of event handler to an event_trigger
Describe the bug When you pass the wrong kind of argument to an event trigger (var instead of event handler), it result in a runtime JS error instead of compilation python error.
To Reproduce Steps to reproduce the behavior:
class State(pc.State):
some_var: bool
def index():
return pc.box(pc.icon(tag="AddIcon", on_click=State.some_var))
Expected behavior Compilation should catch this error and throw a Python traceback to identify the problem
Screenshots

** Specifics (please complete the following information):**
- Python Version: 3.10
- Pynecone Version: 0.1.13
- OS: Ubuntu 22.04
- Browser (Optional): Chrome