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.
LiveComponentStack::isLiveComponent
1 parent 03c3f9b commit f6ea6ccCopy full SHA for f6ea6cc
src/LiveComponent/src/Util/LiveComponentStack.php
@@ -41,7 +41,9 @@ public function getCurrentLiveComponent(): ?MountedComponent
41
42
private function isLiveComponent(string $classname): bool
43
{
44
- return [] !== (new \ReflectionClass($classname))->getAttributes(AsLiveComponent::class);
+ static $cache = [];
45
+
46
+ return $cache[$classname] ??= [] !== (new \ReflectionClass($classname))->getAttributes(AsLiveComponent::class);
47
}
48
49
public function getCurrentComponent(): ?MountedComponent
0 commit comments