这句话爆了警告
即:Warning: Input is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlle...
如果,我在initailValue传入不变的量string,就不会暴警告
为什么 呢?
巴扎黑2017-04-17 14:47:12
あなたが報告したエラーの最後のリンクには、次のように記載されています。制御された <input> には value prop があります。コードには value 属性が表示されません。
関数の実行結果を入力に入れることは、個人的には望ましくありません。 formItemLayoutと同じように、この関数の実行結果をあらかじめ変数に保存しておいて、その変数をinputに入れるのが良いと思います。