PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
834 stars 162 forks source link

refactor: remove need to use any hooks #91

Closed andreialecu closed 3 years ago

andreialecu commented 3 years ago

This is an alternative to #90 that simplifies things further.

containerRef and refMap are no longer needed, the tab names are passed to createCollapsibleTabs instead.

I'm not sure if this limits things in any way.

Open for discussion.

With this PR only const { useTabsContext, ...Tabs } = createCollapsibleTabs(TabNames) is needed.

andreialecu commented 3 years ago

This would be a breaking change btw.

andreialecu commented 3 years ago

I like #93 better btw.

PedroBern commented 3 years ago

I like #93 better btw.

This is great too, but I like #93 better too!