Skip to content

Instantly share code, notes, and snippets.

@anirudhjain75
Created June 15, 2019 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anirudhjain75/8b81bbd63ac98aa61fc22000938fae00 to your computer and use it in GitHub Desktop.
Save anirudhjain75/8b81bbd63ac98aa61fc22000938fae00 to your computer and use it in GitHub Desktop.
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/entity/alias/EditForm.js:190:23
Cannot call setState with object literal bound to the first parameter because:
• read-only array type [1] is incompatible with array type [2] in property
errors.
• string [3] is incompatible with number [4] in property value.
root/entity/alias/EditForm.js
185│ field={state.type}
186│ label={l('Type:')}
187│ // eslint-disable-next-line react/jsx-no-bind
188│ onChange={(e) => setState({
189│ ...state,
190│ type: {
191│ ...state.type,
192│ value: e.target.value,
193│ },
194│ })}
195│ options={formOptions(typeOptions)}
196│ />
197│ </fieldset>
root/types.js
[2] 481│ errors: Array<string>,
:
[1] 493│ +errors: $ReadOnlyArray<string>,
root/components/FormRowNameWithGuesscase.js
[4] 23│ type: FieldT<number>,
root/components/FormRowSelect.js
[3] 21│ +field: ReadOnlyFieldT<number | string>,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment