Skip to content

Exercice 1 (Proxy component) - Bonus 1Β #6

@johann-blanchet

Description

@johann-blanchet

La solution du BONUS 1 de l'exercice 1 (Proxy component) fait ressortir un WARNING dans la console :

Warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.
input
Button
div
Header
App index.js:1

Il faut en fait indiquer "defaultValue" dans la champ "INPUT" Γ  la place de "value" :

<input style={{backgroundColor:'lightblue', border:'none', padding:'6px 6px', cursor: 'pointer'}} type="Button" defaultValue="πŸ‘" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions