Merge pull request #6 from react-navigation/useRNScreens
Use react-native-screens when native screen components are available
This commit is contained in:
commit
36ccf5ba6b
|
@ -33,6 +33,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/react-navigation/react-navigation-stack#readme",
|
||||
"dependencies": {
|
||||
"react-native-screens": "^1.0.0-alpha.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@expo/vector-icons": "^6.2.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, Platform } from 'react-native';
|
||||
import { Screen } from './screens';
|
||||
import { Screen } from 'react-native-screens';
|
||||
import createPointerEventsContainer from './createPointerEventsContainer';
|
||||
|
||||
const EPS = 1e-5;
|
||||
|
|
|
@ -18,10 +18,10 @@ import {
|
|||
withOrientation,
|
||||
NavigationProvider,
|
||||
} from 'react-navigation';
|
||||
import { ScreenContainer } from 'react-native-screens';
|
||||
|
||||
import Card from './StackViewCard';
|
||||
import Header from '../Header/Header';
|
||||
import { ScreenContainer } from './screens';
|
||||
|
||||
import TransitionConfigs from './StackViewTransitionConfigs';
|
||||
import { supportsImprovedSpringAnimation } from '../../utils/ReactNativeFeatures';
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import React from 'react';
|
||||
import { Animated, View } from 'react-native';
|
||||
|
||||
const ScreenContainer = View;
|
||||
|
||||
class Screen extends React.Component {
|
||||
render() {
|
||||
// Filter out active prop in this case because it is unused and
|
||||
// can cause problems depending on react-native version:
|
||||
// https://github.com/react-navigation/react-navigation/issues/4886
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
const { active, onComponentRef, ...props } = this.props;
|
||||
|
||||
return <Animated.View {...props} ref={onComponentRef} />;
|
||||
}
|
||||
}
|
||||
|
||||
export { ScreenContainer, Screen };
|
|
@ -4981,6 +4981,10 @@ react-native-safe-area-view@^0.8.0:
|
|||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-screens@^1.0.0-alpha.8:
|
||||
version "1.0.0-alpha.8"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.8.tgz#c70b2d753420b9b9a64c4354bb301628f3a7d580"
|
||||
|
||||
react-native-tab-view@^0.0.77:
|
||||
version "0.0.77"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
|
||||
|
|
Loading…
Reference in New Issue