diff --git a/lib/index.js b/lib/index.js index f0a4837..e74dbc1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,10 +16,10 @@ class ScrollableTabView extends React.Component { static getDerivedStateFromProps(props, state) { if ( - props.index !== state.currentPage + props.page !== state.currentPage ) { return { - currentPage: props.index, + currentPage: props.page, }; } return null;