Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CToast: Dont pass forward key prop as it's a special prop.  #404

Closed
@jasperfirecai2

Description

@jasperfirecai2

If you add a key prop to CToast (e.g. mapping a list of toasts) this warning will show in the console:
key is not a prop. Trying to access it will result in undefined being returned.

As you can see CToast attempts to read and forward the key prop. This should be a differently named prop instead.

It's also not typed correctly. keys are numbers or strings


See docs
https://react.dev/warnings/special-props

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