Why is the syntax wrong SectionSeparatorComponent={Divider({ bold: true })}
- User
Why is the syntax wrong SectionSeparatorComponent={Divider({ bold: true })}
- Assistant
The syntax
SectionSeparatorComponent={Divider({ bold: true })}is incorrect because you are attempting to call theDividerfunction directly within the JSX. In JSX, when you want to pass a component as a prop, you should pass the component reference itself, not the result of calling the component function.Instead, you should define the component separately and then pass it as a component reference. If expects props, you may need to provide those props in a way that makes use of React's component structure.