React passing props to children within parent component + TypeScript
Let's say I have Select component that manages state for event onChangeOption when option is checked/unchecked. Option can be component SimpleOption or CheckboxOption.
Select.tsx
SimpleOption.tsx
Page.tsx
Question
On page.tsx, I have to specify onChangeOption for SimpleOption [or CheckboxOption]. How can I avoid it without making onChangeOption optional? (it's required and I don't want to cheat it).
1 Reply
All help appreciated