FBI WARNING: this may be an anti-pattern in regard to react's stateless design.
As is known to all, there're a lot of web components that can be mutated by user interactions, such as
<select>, or the rich editor I am using now. These components are inconspicuous in daily development - we can easily modify the value by typing something in it or set the
value property. However, as React comes with one-way data binding, these components seem to be out of control:
<Input>that maintains its own
stateof value can't be mutated from outside;
valueis set via
propscan't update without outside control.