mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
export react context directly
This commit is contained in:
@@ -16,10 +16,10 @@ module.exports = {
|
||||
return require('./views/NavigationContext').default;
|
||||
},
|
||||
get NavigationProvider() {
|
||||
return require('./views/NavigationContext').default.NavigationProvider;
|
||||
return require('./views/NavigationContext').default.Provider;
|
||||
},
|
||||
get NavigationConsumer() {
|
||||
return require('./views/NavigationContext').default.NavigationConsumer;
|
||||
return require('./views/NavigationContext').default.Consumer;
|
||||
},
|
||||
|
||||
get createSwitchNavigator() {
|
||||
|
||||
@@ -2,10 +2,4 @@ import createReactContext from 'create-react-context';
|
||||
|
||||
const NavigationContext = createReactContext();
|
||||
|
||||
export const NavigationProvider = NavigationContext.Provider;
|
||||
export const NavigationConsumer = NavigationContext.Consumer;
|
||||
|
||||
export default {
|
||||
NavigationProvider,
|
||||
NavigationConsumer,
|
||||
};
|
||||
export default NavigationContext;
|
||||
|
||||
Reference in New Issue
Block a user