williamneto / reactpy-material

Material UI components for reactpy projects
MIT License
9 stars 2 forks source link

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

Open marceloakira opened 1 month ago

marceloakira commented 1 month ago

Description

Version

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
williamneto commented 1 month ago

Thanks for the report @marceloakira ! I will try to reproduce and investigate it soon, but by the error looks like its something related to core reactpy-material.