Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
<Controller
name="referralCode"
control={control}
rules={{
required: {
value: true,
message: `You cannot register using your own referral code.`,
},
}}
render={({ field }) => (
<Input
id="inputPwModal"
type="text"
dataTestId="inputPwModal"
placeholder="Referral code"
{...field}
value={field.value} // 이부분 수정 => value={field.value || ``}
onChange={(e) => field.onChange(e.target.value)}
/>
)}
/>
리액트 인풋 관련 에러-Warning: A component is changing an uncontrolled input to be controlled.