'callbacks.postWatcher']) { $this->ssrHandler = new SSRHandler($interactiveNamespace, $rootElementId, $rootElementAttributes); } /** * Render the portal shell so the client router can take over. * * @return string */ // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- the type hint is the route contract; there is nothing to read off it public function show(Request $request) { // Both steps are needed for the bundle to load: constructing BaseView // hooks wp_enqueue_scripts, and registerAssets() declares the script // modules that hook then enqueues. Without them the route renders the // loading shell and React never boots. $baseView = new BaseView(); $baseView->registerAssets(); SeoMeta::forNotifications(); return $this->ssrHandler->generateView('/notifications', [], [], []); } }