reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Calling background events from other background events and events

Open Alek99 opened this issue 11 months ago β€’ 2 comments

Describe the Features A clear and concise description of what the features does.

You would technically get any parallelism (We may want to just through warning about this) but this is a common use case people would want

  • What is the purpose of the feature?

  • Show an example / use cases for the new feature.

class LandingState(rx.State):
     .... 

    @rx.event(background=true)
    def mark_reminder_read(self, reminder_id: str):
        ...

    @rx.event(background=true)
    def toggle_reminder_modal(self):
        await  LandingState.mark_reminder_read(reminder_id= "test")

Alek99 avatar Mar 19 '25 01:03 Alek99

Related to https://github.com/reflex-dev/reflex/issues/4947 for reference

Alek99 avatar Mar 19 '25 01:03 Alek99