Answer the question
In order to leave comments, you need to log in
Where is the prop passed to the component?
Guys, hello everyone.
There is such a component
const DatePicker = connect()(({ dispatch, ...props }) => {
console.log(props);
return <DateRangeWithPresentFlag {...props} />;
});
<Fields
names={[`${namePrefix}startDate`, `${namePrefix}endDate`]}
namePrefix={namePrefix}
component={DatePicker}
isPresent={namePrefix === "currentAddress_"}
required
label={formatMessage(messages["LivingArrangement.Date"])}
/>
Answer the question
In order to leave comments, you need to log in
- DatePicker is passed to Fields
- Most likely it is called inside the Fields component (unless, of course, it is passed further and is called somewhere in the third knee)
- Accordingly, DatePicker accepts all props from the Fields component
- ...props: Read about the spread https:// developer.mozilla.org/en/docs/Web/JavaScript...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question