Move to compound components (
Select.Option, Select.Group) with a shared contextCompound components (Select.Option, Select.Group) are the best refactor. Consumers write options, groups and footers as children. The parent keeps the selection and keyboard logic in a shared context. "Accept a single config object" is the tempting wrong answer. It only renames the problem, because all the options are still there. Splitting into copies like SimpleSelect and IconSelect duplicates behaviour, and the copies then drift apart over time.
Read more