Passing props in parent component
React I have two types of components:
- List
- option (component CheckboxOption or RadioOption could be used in props.children)
Now I want to use it in the app, how can I do it without repeating props? (Example is simplified, and in real scenario CheckboxOption could be also replaced with RadioOption etc...
page.tsx
- List
- option (component CheckboxOption or RadioOption could be used in props.children)
Now I want to use it in the app, how can I do it without repeating props? (Example is simplified, and in real scenario CheckboxOption could be also replaced with RadioOption etc...
page.tsx
