{"record":{"id":"774ace780cb7e10d","repo":"DioxusLabs/dioxus","slug":"no-root-component-provided-for-headless-fullstacks","errorCode":null,"errorMessage":"No root component provided for headless FullstackState","messagePattern":"No root component provided for headless FullstackState","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/fullstack-server/src/server.rs","lineNumber":238,"sourceCode":"    renderers: Arc<SsrRendererPool>,\n    pub(crate) rt: LocalPoolHandle,\n}\n\nimpl FullstackState {\n    /// Create a headless [`FullstackState`] without a root component.\n    ///\n    /// This won't render pages, but can still be used to register server functions and serve static assets.\n    pub fn headless() -> Self {\n        let rt = LocalPoolHandle::new(\n            std::thread::available_parallelism()\n                .map(usize::from)\n                .unwrap_or(1),\n        );\n\n        Self {\n            renderers: Arc::new(SsrRendererPool::new(4, None)),\n            build_virtual_dom: Arc::new(|| {\n                panic!(\"No root component provided for headless FullstackState\")\n            }),\n            config: ServeConfig::new(),\n            rt,\n        }\n    }\n\n    /// Create a new [`FullstackState`]\n    pub fn new<M: 'static>(\n        config: ServeConfig,\n        root: impl ComponentFunction<(), M> + Send + Sync + 'static,\n    ) -> Self {\n        let rt = LocalPoolHandle::new(\n            std::thread::available_parallelism()\n                .map(usize::from)\n                .unwrap_or(1),\n        );\n\n        Self {","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-server/src/server.rs#L220-L256","documentation":"Code attempted to access the root component of a FullstackState created via headless(). Headless states intentionally have no root component (the SsrRendererPool was built with None), so any API that needs to render a root page panics.","triggerScenarios":"Thrown at packages/fullstack-server/src/server.rs:238 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a root component when building the headless FullstackState, e.g. with_root or the constructor that takes the app component."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}