Skip to content

bug: component box with a child component box doesn't render #6

@marceloakira

Description

@marceloakira

Description

  • A component returning a box with a child component returning another box doesn't render

Version

  • pre v.0.0.1

Steps to Reproduce

  1. Create two components:
from reactpy import component, run, html
from reactpy_material import box


@component  # @componet is removed: OK
def hello_box():
    return box(
    # return html.div(   # OK if s/box/html.div/
        html.h1(
            {"key": "title1"},
            "Hello World"
        ),
        key="hello box"
    )


@component
def hello_box_inside_box():
    return box(
        hello_box(),
        key="external box"
    )


run(hello_box_inside_box)
# run(hello_box) # running child component - OK
  1. Run the code and inspect in the browser and nothing is rendered, resulting in a blank page.
  2. Inspect the web page and find the error: "Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name."
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions