Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marceloakira opened this issue May 22, 2024 · 2 comments
Open

Comments

@marceloakira
Copy link
Contributor

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
@williamneto
Copy link
Owner

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.

@wangzyh
Copy link

wangzyh commented Oct 22, 2024

same problem
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants