{"record":{"id":"90efa32765ef7b82","repo":"reflex-dev/reflex","slug":"f-no-markdown-component-found-for-tag-tag","errorCode":null,"errorMessage":"f\"No markdown component found for tag: {tag}.\"","messagePattern":"f\"No markdown component found for tag: (.+?)\\.\"","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/reflex-components-markdown/src/reflex_components_markdown/markdown.py","lineNumber":362,"sourceCode":"        )\n\n    def get_component(self, tag: str, **props) -> Component:\n        \"\"\"Get the component for a tag and props.\n\n        Args:\n            tag: The tag of the component.\n            **props: The props of the component.\n\n        Returns:\n            The component.\n\n        Raises:\n            ValueError: If the tag is invalid.\n        \"\"\"\n        # Check the tag is valid.\n        if tag not in self.component_map:\n            msg = f\"No markdown component found for tag: {tag}.\"\n            raise ValueError(msg)\n\n        # If the children are set as a prop, don't pass them as children.\n        children = [_CHILDREN] if props.get(\"children\") is None else []\n        # Get the component.\n        return self.component_map[tag](*children, **props).set(special_props=[_PROPS])\n\n    def format_component(self, tag: str, **props) -> str:\n        \"\"\"Format a component for rendering in the component map.\n\n        Args:\n            tag: The tag of the component.\n            **props: Extra props to pass to the component function.\n\n        Returns:\n            The formatted component.\n        \"\"\"\n        return str(self.get_component(tag, **props)).replace(\"\\n\", \"\")\n","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-components-markdown/src/reflex_components_markdown/markdown.py#L344-L380","documentation":"When customizing rx.markdown(component_map={...}), the component_map must contain an entry for every markdown tag Reflex renders (h1, p, code, etc.). get_component looks up the component factory by tag and raises ValueError for unknown tags — including tags introduced in a base map you overrode or removed.","triggerScenarios":"Passing a component_map that replaces the base map without covering all standard tags, or referencing a tag string with different casing/typo in _get_tag_map customizations.","commonSituations":"Extending markdown styling by supplying only your custom tags instead of merging with the default map; overriding 'code' handling and breaking the lookup for nested tags like 'codeblock'.","solutions":["Merge your map over the base: component_map={**rx.markdown.default_component_map, 'h1': my_h1} (or extend the map returned by get_base_component_map rather than replacing it)","Check the exact tag string casing in your component_map keys","Upgrade reflex-components-markdown — new markdown tags in newer versions require an updated base map"],"exampleFix":"# before\nrx.markdown(src, component_map={'h1': custom_h1})\n# after\nfrom reflex_components_markdown.markdown import get_base_component_map\nrx.markdown(src, component_map={**get_base_component_map(), 'h1': custom_h1})","handlingStrategy":"validation","validationCode":"from reflex_components_markdown.markdown import get_base_component_map\nmerged = {**get_base_component_map(), **custom}\nfor tag in required_tags:\n    assert tag in merged, f'missing tag {tag}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always merge over the base component map, never replace it","Test-render sample markdown after customizing component_map"],"tags":["reflex","markdown","component-map","unknown-tag"],"backgroundTag":"component-prop-validation","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}