Skip to content

Support dot notation in reactpy.web.export #543

Description

@Archmonger

Current Situation

Currently nested imports cannot be resolved, such as Bootstrap Navbar.Toggle

bootstrap = reactpy.web.module_from_template(
    "react", "react-bootstrap", resolve_exports=True
)
toggler = reactpy.web.export(bootstrap, "Navbar.Toggle")

Proposed Changes

Update reactpy.web.export to support dot notation by modifying this check to drill down into the module using the dot-separate names rather than just checking to see if it's a direct export. Here's how this could be done.

For more information see this comment.

Activity

  1. added this to the 1.0 milestone on Jan 11, 2022
  2. rmorshea commented on Nov 29, 2022

    @rmorshea
    Collaborator

    Gonna push this to 2.0 since it's more of a nicety.

  3. added
    priority-3-lowMay be resolved one any timeline.
    and removed
    priority-2-moderateShould be resolved on a reasonable timeline.
    on Nov 29, 2022
  4. modified the milestones: 1.0, on Nov 29, 2022
  5. modified the milestones: , on Jan 29, 2023
  6. removed this from the milestone on Feb 21, 2023
  7. changed the title [-]Support dot notation in idom.web.export[/-] [+]Support dot notation in reactpy.web.export[/+] on Jan 26, 2025
  8. linked a pull request that will close this issueSubcomponent notation #1285on Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flag-good-first-issueA well defined and self-contained task.priority-3-lowMay be resolved one any timeline.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions