Skip to content

Commit

Permalink
Merge pull request #93 from andreialecu/refactor-apicleanup3
Browse files Browse the repository at this point in the history
Version 4.0 with api refactoring and dynamic tabs.

BREAKING CHANGES:

createCollapsibleTabs() no longer exists. Instead the library exports different components (Container, Tab, ScrollView, ListView) which can be nested like normal react components.
refMap no longer exists, and creating refs is no longer necessary (it's all handled internally)
ScrollView/FlatList now forward their refs, so the caller can just tap into their ref prop
the existing onIndexChange was renamed to onTabChange, and a separate onIndexChange was implemented that just returns the new index (as a number)
diffClampEnabled was changed to revealHeaderOnScroll
redundant prop snapEnabled was removed, instead snapThreshold is number | null | undefined. If not a number, then snap is not enabled. Setting it to 0.5 will result in snapping in the middle, like in the previous version.

Fixes: #100, #98, #94, #88
  • Loading branch information
PedroBern committed Feb 9, 2021
2 parents b2d5d81 + 54de75a commit 03e7202
Show file tree
Hide file tree
Showing 54 changed files with 2,347 additions and 1,854 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ module.exports = {
// 'react-native/no-color-literals': 'warn',
// 'react-native/no-raw-text': 'warn',
// 'react-native/no-single-element-style-arrays': 'warn',
'import/no-default-export': 'error',
},
plugins: ['react-native-globals', 'react-native'],
extends: 'universe/native',
extends: ['universe/native'],
env: {
'react-native-globals/all': true,
},
Expand Down

0 comments on commit 03e7202

Please sign in to comment.