Answer the question
In order to leave comments, you need to log in
How to fix Property 'placeholder' does not exist on type error?
Good afternoon, please tell me how to solve the error Property 'placeholder' does not exist on type 'FormTypes'. Property 'placeholder' does not exist on type 'RadioType'.
Here is my code:
type InputType = {
value: string;
name: string;
placeholder: string
}
type RadioType = {
value: string;
name: string;
}
type FormTypes = InputType | RadioType;
<Input
value={inputValue}
name={name}
placeholder={placeholder}
/>
<Radio
value={value}
name={name}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question