editor-core icon indicating copy to clipboard operation
editor-core copied to clipboard

Why does this component warn it's in "controllred mode" [sic]

Open eloff opened this issue 6 years ago • 1 comments

Someone went to the trouble to add a warning about this when value is supplied, but not explain why the warning exists. Is it bad? Will it format my hard drive or throw a red sock in with my whites? Given the warning text, the latter is far-fetched but plausible.

eloff avatar Aug 03 '18 17:08 eloff

I have made a PR to remove this, see #19

I looked through the code and I believe it is there because developers might mistakenly provide the value via props and then the field would be uneditable because it is controlled, so a warning was added to let them know. I think that making the component controlled is expected behaviour and that the warning should be removed because it spams the console and looks bad in production.

nathan-knight avatar Oct 22 '18 13:10 nathan-knight