|
|
|
|
|
by dragonwriter
1730 days ago
|
|
You made a “you have to do X” claim, and then point to a documentation page that shows you don’t have to, even though it is the recommended pattern. React works fine with components that don't follow the recommendation, though if you freely mix internal state updates and external updates via props that shouldn't represent instance changes, you can very easily make something unnecessarily difficult to reason about. So the recommended pattern of either doing a fully-controlled or fully-uncontrolled component is a sensible recommendation that makes sense to guide design. But nothing will break and the React cops won't arrest you if you use props driving state, though if you do too much of that whoever had to maintain your code may be upset. |
|