Skip to content

feat: Slot in "react" way #610

Open
Open
@Sukaato

Description

@Sukaato

Prerequisites

Describe the Feature Request

To get better DX with libraries built with Stencil, it might be interesting to have a “React” way of using component slots.

As no IDE lets you know which slots are available, this could be very useful.

Describe the Use Case

Acutal:

import { ScpComponent } from '@scope/react"

function SomeComponent() {
  return (
    <ScpComponent>
     <div slot="some-slot">
       content
     </div>
     default slot
    </ScpComponent>
  );
}

expected:

import { ScpComponent } from '@scope/react"

function SomeComponent() {
  return (
    <ScpComponent>
     <ScpComponent.SomeSlot>
       content
     </ScpComponent.SomeSlot>
     default slot
    </ScpComponent>
  );
}

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanteda good issue for the communitytype: featureNew feature, request or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions