Skip to content

Use of component in Section leads to readability issues in large code #10

@drewpc

Description

@drewpc

Would you consider a PR that removes the need for a component attribute in the <Section> component? It would favor using all children instead. This architecture change would alter the below example:

    <Section
      component={
        <div>
          <MyIcon />
          <H>My hx</H>
        </div>
      }
    >
      <Section component={<H>My hx+1</H>}>
        <p>...</p>
      </Section>
      <Section component={<H>My hx+1</H>}>
        <ChildComponent />
      </Section>
    </Section>

To be more readable in a large code base, like this::

    <Section>
      <div>
        <MyIcon />
        <H>My hx</H>
      </div>
      <Section>
        <H>My hx+1</H>
        <p>...</p>
      </Section>
      <Section>
        <H>My hx+1</H>
        <ChildComponent />
      </Section>
    </Section>

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