Symfony UX: Turbo
Listening & Publishing
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

My chat application is finally ready to become interactive! I've just installed the symfony/ux-turbo-mercure package and set up Mercure in my server. I'm ready to receive messages from other people!

My current template looks like this:

<turbo-stream action="update" target="chat-messages">
    <template>
        {{ include('chat/_messages.html.twig') }}
    </template>
</turbo-stream>

<turbo-stream action="replace" target="chat-user-list">
    <template>
        {{ include('chat/_user-list.html.twig') }}
    </template>
</turbo-stream>

And I now need to listen to a new-messages topic in Mercure in order to receive them. How can I do that?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.