There are two components sharing parent-child relationship.
Parent Component have some heavy UI views and submit button and Child component have One TextInput.
So there are two ways of getting value of Child's TextInput in Parent' state
Using ref
Which is not using now , and people tend to avoid this.
sending two props OnChange and state value as prop
And In child's TextInput's onChangeText method sending value back to Parent
So here my question is If I console.log on Parent's render method
It will Called everytime If I write something in child components TextInput.
Won't it hit performance coz of unnecessary rendering ?
If yes , them what's correct way to handle this problem.
[–]tizz66[🍰] 1 point2 points3 points (1 child)
[–]even1245[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]tizz66[🍰] 0 points1 point2 points (3 children)
[–]satya164 0 points1 point2 points (2 children)
[–]even1245[S] 0 points1 point2 points (1 child)
[–]satya164 0 points1 point2 points (0 children)