…and-new style you want to learn. For example, if you know the compound-components concept to share stuff. Create a parent component called tabs-parent that contain the tab-state and contain methods for add tabs, remove tabs, active tab, previous active tab. Then share it between things. I’ll show you an example how to build react-tabs using compound-components pattern.
Magic start from the code below on compound-components. Thanks to Kent C. Dodds for his course about the advanced React component patterns. Also, you can check this article “Advanced React Component Patterns” written by him about these things.