Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Minor fixes in console errors when running unit tests #922

Merged
merged 2 commits into from
Aug 28, 2017

Conversation

maludwig
Copy link
Contributor

This fixes warning messages that were annoying and confusing me in my personal project about "defaultChecked" being set at the same time as "checked" is set, mostly, they also appeared in the console error log when running the unit tests. So I fixed those ones, and then got carried away and solved all of the warnings in the unit tests. The following error/warning messages were resolved:

Warning: Control contains an input of type checkbox with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the top-level render call using <Connect(Form)>. See https://fb.me/react-warning-keys for more information.
    in DefaultConnectedControl

Warning: Failed prop type: FamiliarText: prop type `onChange` is invalid; it must be a function, usually from React.PropTypes.
    in FamiliarText (created by Control)
    in Control (created by Connect(Control))
    in Connect(Control) (created by Modeled(Connect(Control)))
    in Modeled(Connect(Control)) (created by DefaultConnectedControlText)
    in DefaultConnectedControlText
    in Provider
Warning: Failed prop type: MT: prop type `onChange` is invalid; it must be a function, usually from React.PropTypes.
    in MT (created by Control)
    in Control (created by Connect(Control))
    in Connect(Control) (created by Modeled(Connect(Control)))
    in Modeled(Connect(Control)) (created by DefaultConnectedControlText)
    in DefaultConnectedControlText
    in Provider
Warning: Unknown prop `onChangeText` on <input> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in input (created by TextInput)
    in div (created by TextInput)
    in TextInput (created by Control)
    in Control (created by Connect(Control))
    in Connect(Control) (created by Modeled(Connect(Control)))
    in Modeled(Connect(Control)) (created by DefaultConnectedControl)
    in DefaultConnectedControl
    in Provider
Warning: TextInput contains an input of type undefined with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components
Warning: Unknown props `focus`, `touched` on <input> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in input (created by TextInput)
    in div (created by TextInput)
    in TextInput (created by Control)
    in Control (created by Connect(Control))
    in Connect(Control) (created by Modeled(Connect(Control)))
    in Modeled(Connect(Control)) (created by DefaultConnectedControl)
    in DefaultConnectedControl
    in Provider

@davidkpiano
Copy link
Owner

Fantastic, thanks!

@davidkpiano davidkpiano merged commit 06787d3 into davidkpiano:master Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants