Skip to content

Regression for slots and functional components #7958

@blake-newman

Description

@blake-newman

Version

2.5.16

Reproduction link

https://codesandbox.io/s/816m7v3rq9

Steps to reproduce

Create a nested set of functional components, then change the slot definition in the child component. In 2.5.15 the slots are correctly rendered, but in 2.5.16 this is not happening. This is because the slot names are being persisted, so not correctly passed down the chain.

This is a common pattern when creating reusable AHOC components, such as a dropdown with predefined content, but using a lower level component as a structural component.

https://codesandbox.io/s/j44nj82483 (Version 2.5.15)

https://codesandbox.io/s/816m7v3rq9 (Version 2.5.16)

What is expected?

Slots to render in there correct position

What is actually happening?

Slots are not correctly assigned to there correct possition


This is introduced by this ticket: #7710

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions