Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
fix: remove unused code which causes a flow error (#641)
Browse files Browse the repository at this point in the history
There was a flow error. This fixes it.
```
Error ---------------------------------------------------- ../../node_modules/react-native-tab-view/src/TabView.js:121:8
Property `delayRenderOfNonFocusedTabs` is missing in `State` [1].
   ../../node_modules/react-native-tab-view/src/TabView.js:121:8
   121|       !this.state.delayRenderOfNonFocusedTabs ||
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
References:
   ../../node_modules/react-native-tab-view/src/TabView.js:41:70
    41| export default class TabView<T: *> extends React.Component<Props<T>, State> {
                                                                             ^^^^^ [1]
```
  • Loading branch information
AndrewJack authored and satya164 committed Nov 16, 2018
1 parent 0f18bb2 commit 19ac3ef
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/TabView.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ export default class TabView<T: *> extends React.Component<Props<T>, State> {
return this.props.renderScene(props);
};

_shouldRenderScene = (index: number) => {
return (
!this.state.delayRenderOfNonFocusedTabs ||
this.props.navigationState.index === index
);
};

_handleLayout = (e: any) => {
const { height, width } = e.nativeEvent.layout;

Expand Down

0 comments on commit 19ac3ef

Please sign in to comment.