Skip to content

EventSpec should store the real python arg values where possible #6270

@masenf

Description

@masenf

With the event loop being managed on the backend, it is now possible to chain events with much more exotic arguments, since they do not have to be serialized. This opens the door for chaining event handlers with callback functions, locks, tasks, etc. However, in order for it to actually work, EventSpec needs to be updated to defer Var arg creation to EventVar creation time so the EventSpec can keep the real values for as long as possible.

P2 TODO comment left in production code

Per the project rule, commented-out code and leftover TODOs should be removed before merging. This TODO should either be resolved or tracked as a separate ticket rather than left in the source:

# TODO: allow real python types to be passed through the backend queue.

Rule Used: Remove commented-out code before merging PRs. (source)

Learnt From
reflex-dev/reflex-web#1619

Originally posted by @greptile-apps[bot] in #6267

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions