Skip to content

[LiveComponent] Returning TurboStreamResponse after form submit does not workΒ #3070

@FluffyDiscord

Description

@FluffyDiscord
 #[LiveAction]
    public function sendForm(): Response
    {
        $this->submitForm();

        ... do whatever

        return (new TurboStreamResponse())->replace('my_test_container', '<b>Not working!</b>');
    }

This is not working. Is this intentional? I tried this on two different projects, none of them worked.

My use case:
I have element on page with some info that has inside it live component with form with user rating, and I want to replace that element to show fresh information, and hide user rating.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions