File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -477,8 +477,8 @@ The following code won't work as expected::
477477
478478 public function mount(): void
479479 {
480- {# ❌ this won't work: at this point $type still has its default value.
481- Passed values are not yet available in props. #}
480+ // ❌ this won't work: at this point $type still has its default value.
481+ // Passed values are not yet available in props.
482482 if ('error' === $this->type) {
483483 // ...
484484 }
@@ -493,8 +493,8 @@ untyped and has no default). If you need a prop's value, declare a parameter in
493493
494494 public function mount(string $type): void
495495 {
496- {# ✅ this works as expected: the $type argument in PHP has the value
497- passed to the 'type' prop in the Twig template #}
496+ // ✅ this works as expected: the $type argument in PHP has the value
497+ // passed to the 'type' prop in the Twig template
498498 if ('error' === $type) {
499499 // ...
500500 }
You can’t perform that action at this time.
0 commit comments