-
Notifications
You must be signed in to change notification settings - Fork 734
Typescript/tab controller move to function component #1098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript/tab controller move to function component #1098
Conversation
…-component-2 * master: export Button enums fix typings Fix lint issues Fix Switch color based props to use ColorValue typing Fix manual placeholderTextColor typing for ChipsInput Fix manualy typing of ChipsInput for selectionColor prop fix @types/react-native version to 0.63.4 Fix rn63 typings (#1100) Revert "fix for tabbar types for scrollbar" fix for tabbar types for scrollbar ScrollBar - TS migration (#1078) TabBar refactor (#1076) Update reanimated and gesture-handler to their latest version cleanup Cards example screen upgraded expo demo app to expo v40 (#1096) Update RNN version # Conflicts: # src/components/tabController/TabBar.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Great!
Anyway, I wish we can maybe clean up some more the code in TabBar.
(Not saying it was super clean before..)
But see in one of my comments, I suggested using custom hooks for different parts of the code, no need to over do it, but it can make the TabBar's code more readable.
What do you think?
} | ||
}, []); | ||
|
||
const [itemsWidths, setItemsWidths] = useState<number[]>([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider moving some parts of the code to a separate custom hook (it does't have to be every part)
This will cleanup some of TabBar's code and create better separation.
For instance, maybe we can move the whole logic that calculates itemWidth and itemOffset to a separate hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in the second PR ✅
Simplify the ignore Co-authored-by: Ethan Sharabi <[email protected]>
…-logic * master: Fix lint error cleanup eslintrc file Infra/useDidUpdate (#1112) Support UI presets for Incubator.TextField and set a 'default' preset (#1111) Fix lint issues fix radioButton lint errors and generate types Fix/imageSource deprecation (#1115) Typescript/tab controller move to function component (#1098) Feat/radio button customize styling (#1092) bug fixes for TabBar refactor (#1106) Update ios target to 11 prettify file Fix icon size in badges example screen (#1104) icon prop - fix type to be both number and object. (#1086) enable eslint on both ts and js files (#1101) fix eslint (#1107) # Conflicts: # demo/src/screens/componentScreens/FaderScreen.tsx # src/components/fader/index.tsx # src/components/tabController/FadedScrollView.tsx # src/components/tabController/TabBar.tsx
Description
TabBar
to function component.FadedScrollView
(should we make this more generic, it has some RTL logic).Fader
's RTL logic - please take a look at theFaderScreen
, it has some logic, I'm not sure if that's ok.Changelog
Move TabBar to function component & add support for Fader in RTL