Skip to content

Issue placeholder deprecation warning only on initial component render #3250

@adammcfadden

Description

@adammcfadden

🙋 Feature Request

#2759 + #2966 deprecated placeholders and usage of placeholders now outputs a console.warn message. The warning message is currently output on each render of the component, which can fill up the console pretty quickly.

This request is to make a change to the implementation so that the deprecation warning is only display on the initial render of the component. This pattern is currently implemented in the provider for a warning there.

🤔 Expected Behavior

One deprecation message is sent to console.warn when the component is rendered. Subsequent re-renders to not send another warning.

😯 Current Behavior

A deprecation message is sent to the console with every re-render of the component.

💁 Possible Solution

Implement the same pattern as the Provider for warning only once..

🔦 Context

Clutters the console with warnings, which can hide other warnings.

🧢 Your Company/Team

Adobe/Marketo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions