docs(wrapping-react): remove broken EventHandler import in props example#6714
docs(wrapping-react): remove broken EventHandler import in props example#6714anxkhn wants to merge 1 commit into
Conversation
The Event Handlers example imported `EventHandler` from `reflex.vars.event_handler`, a module that does not exist, so copying the snippet raised `ModuleNotFoundError`. The imported symbol was also unused in the example (the block references `rx.EventHandler`). Drop the dead import; the remaining `FunctionVar` and `ObjectVar` imports are valid and used. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
Greptile SummaryRemoves a single broken import line from the "Event Handlers" code example in
Confidence Score: 5/5Documentation-only fix; removes a single dead import line with no runtime impact on the library itself. The change removes one line from a Markdown code example. The deleted import pointed to a module that does not exist in the codebase and was unused in the snippet, so the fix is straightforwardly correct and there is no risk of regression. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "docs(wrapping-react): remove broken Even..." | Re-trigger Greptile |
The "Event Handlers" example in
docs/wrapping-react/props.mdstarts its Pythoncode block with:
There is no
reflex.vars.event_handlermodule (reflex/vars/only containsbase,color,datetime,dep_tracking,function,number,object, andsequence), so a reader copying the snippet hits an immediate error:The imported
EventHandlersymbol is also unused in the example: the blockdefines its event handlers with
rx.EventHandler[...], never the bareEventHandler. The line is therefore both broken and dead, so this PR simplyremoves it. The other two imports in the block (
from reflex.vars.function import FunctionVarandfrom reflex.vars.object import ObjectVar) are valid and leftuntouched.
If an explicit
EventHandlerimport were ever wanted here, the canonical path isfrom reflex.event import EventHandler, but the example does not need it.Type of change
All Submissions:
(Searched open and closed PRs for
reflex.vars.event_handler,wrapping-react EventHandler import, andprops.md; none found.)Verification
No doc-snippet execution/doctest harness runs this Markdown, so there is no
automated regression surface. Verified manually under the project venv:
Lint/format clean on the changed file: