Start your All-Access Pass to unlock this challenge
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?