aksonov / aksonov/react-native-router-flux

Scene Transitioning wrong direction Intermittently

Đang mở
#3,446 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
8.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Version
Tell us which versions you are using:
- react-native-router-flux v4.0.6
- react v16.4.0
- react-native v0.57.0
- react-navigation v2.18.3

### Expected behaviour

Switching between tab scenes has no transition.

### Actual behaviour

First interaction to a different tab scene works, afterwards tab scenes will intermittently load from bottom to top.

I've been attempting to debug this issue for weeks now, I've read every issue on the repo regarding scene transitions and the related issues on react-navigation and I believe my code is correct. You can see the error on the return to the initial tab scene in the video capture below in the last frame, it slides up instead of just switching to the tab.

### Code

#### Transition
```
const modalTransition = () => ({
screenInterpolator: StackViewStyleInterpolator.forHorizontal,
})
```

#### Routes:
```









}
onBack={Actions.pop} />


}
direction="horizontal" />
}
onBack={Actions.pop} />





}
renderBackButton={() => }
onRight={Actions.manage}
direction="horizontal" />



```

#### Tab Icon (explore)
```
class TabIcon extends Component {
render() {
return (
{this.press()}}>


)
}

press() {
let delta = new Date().getTime() - this.state.lastPress
if(delta < 200) {
Actions.popTo('search')
} else {
Actions.jump('explore')
}

this.setState({
lastPress: new Date().getTime()
})
}
}

export default TabIcon
```

![ezgif com-video-to-gif 2](https://user-images.githubusercontent.com/243799/53980630-c267a300-40de-11e9-9f7c-80e665921973.gif)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.