Skip to content
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

Another generic back button #5295

Merged
merged 3 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { BackHandler } from 'react-native'

class AndroidBackButton extends Component {
class BackButton extends Component {
static contextTypes = {
router: PropTypes.shape({
history: PropTypes.shape({
Expand Down Expand Up @@ -35,4 +35,4 @@ class AndroidBackButton extends Component {
}
}

export default AndroidBackButton
export default BackButton
5 changes: 3 additions & 2 deletions packages/react-router-native/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ export * from 'react-router'
import NativeRouter from './NativeRouter'
import Link from './Link'
import DeepLinking from './DeepLinking'
import AndroidBackButton from './AndroidBackButton'
import BackButton from './BackButton'

export {
NativeRouter,
Link,
DeepLinking,
AndroidBackButton
BackButton,
BackButton as AndroidBackButton
}
2 changes: 1 addition & 1 deletion packages/react-router-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"DeepLinking.js",
"Link.js",
"NativeRouter.js",
"AndroidBackButton.js",
"BackButton.js",
"main.js",
"experimental/StackRoute.js",
"experimental/TabRoutes.js"
Expand Down