Nextjs 13.4.3 and v8.5.0 warning
carlosveloso opened this issue · comments
Carlos Veloso commented
in this example code:
<Textarea
ref={inputRef}
tabIndex={0}
onKeyDown={onKeyDown}
rows={1}
onChange={e => {}}
value={1}
placeholder="hello."
spellCheck={false}
className="min-h-[60px] w-full resize-none bg-transparent px-4 py-[1.3rem] focus-within:outline-none sm:text-sm"
/>
i get this warning, it works fine tough.
Warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.
at textarea
at TextareaAutosize (webpack-internal:///(sc_client)/./node_modules/react-textarea-autosize/dist/react-textarea-autosize.development.esm.js:17:8)
I downgraded to v8.4.1 and it works fine without any warnings.