-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TextInput] Not clear what Warning Message for TextInput means. #1689
Comments
Can you show us some code that produces this warning? |
Well, I'm using my fork version of react-native which can be found here. now the regular I needed the new version react-native because it has new methods for fixing this issue #1402 |
We can't really support forks, but if you can reproduce this on a standard build of React Native then please do link to the repo and I'll be happy to take a look! Closing until then |
@brentvatne I use the version 0.6-rc and I can see the same warning message. |
This is occurring on the 0.6.0 release version. Can be reproduced by creating a brand new project and adding at least one TextInput field to the render method. |
This is related to line 422 of TextInput.js:
You are mutating props within the render method - which obviously is not good practice. |
@admmasters do you want to submit a PR? Cloning the props should fix it ex: var props = {
...this.props,
style: [styles.input, this.props.style],
}; |
Sure - I was just looking at it now :) |
👍 |
saw this warning today. |
@ide Is this merged in master? I just updated to 0.7.1 and i still see this warning |
It has not been merged. |
Summary: This should close issue 1689. Using Object.assign to pass Flow checks. Closes facebook#1956 Github Author: Matt Revell <[email protected]>
Summary: This should close issue 1689. Using Object.assign to pass Flow checks. Closes #1956 Github Author: Matt Revell <[email protected]>
@brentvatne looks like the solution got merged 5 days ago. |
@browniefed - indeed, this is in master now! Thanks for pointing it out 😄 |
After upgrading React Native to 0.6.0 I'm starting to get this warning.
Warning: Don't set .props.style of the React component <TextInput />. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.
I did everything as it describes above. but nothing works so far. Any idea why this warning start to show up. I would like to see some example if that possible,
The text was updated successfully, but these errors were encountered: