We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e3447d commit 49ec2bbCopy full SHA for 49ec2bb
sfcasts/turbo/turbo-stream.md
@@ -48,6 +48,18 @@ render a template called `product/reviews.stream.html.twig`. We don't need to pa
48
any variables yet, but I'm going to pass an empty second argument because we *do*
49
need to pass a third argument: a `new TurboStreamResponse()`.
50
51
+***TIP
52
+In `symfony/ux-turbo` 2.1 and higher, this code has changed. The `TurboStreamResponse`
53
+is no longer needed, but a `setRequestFormat()` call is:
54
+
55
+```php
56
+$request->setRequestFormat(TurboBundle::STREAM_FORMAT);
57
58
+return $this->render('product/reviews.stream.html.twig');
59
+```
60
61
+***
62
63
[[[ code('e75b86c21e') ]]]
64
65
Okay first: see the `.stream` in the template name? Yep. That has *no* technical
0 commit comments