Skip to content

use defaultProps when an attribute of an object is undefined? #16331

@kud

Description

@kud

Do you want to request a feature or report a bug?

Maybe a bug?

What is the current behavior?

https://codesandbox.io/s/green-snow-79z65

When you give undefined to a direct attribute, it will use the defaultProp.

When you give undefined to an attribute of an object, it'll use this undefined

What is the expected behavior?

I'm not sure but I'm waiting for using the defaultProp even for an attribute of an object?

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

react 16.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions