Skip to content

Commit

Permalink
Moved requireNativeComponent to a new file
Browse files Browse the repository at this point in the history
All the imports connected to requireNativeComponent in ViewPager was moved to  a seperate file.
  • Loading branch information
VisibleMarkov committed Jan 19, 2019
1 parent be51dbc commit 60f147e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Libraries/Components/ViewPager/AndroidViewPagerNativeComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/

'use strict';

const requireNativeComponent = require('requireNativeComponent');

module.exports = requireNativeComponent('AndroidViewPager');
3 changes: 1 addition & 2 deletions Libraries/Components/ViewPager/ViewPagerAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ const ReactNative = require('ReactNative');
const UIManager = require('UIManager');

const dismissKeyboard = require('dismissKeyboard');
const requireNativeComponent = require('requireNativeComponent');

const NativeAndroidViewPager = requireNativeComponent('AndroidViewPager');
const NativeAndroidViewPager = require('AndroidViewPagerNativeComponent');

import type {SyntheticEvent} from 'CoreEventTypes';
import type {ViewStyleProp} from 'StyleSheet';
Expand Down

0 comments on commit 60f147e

Please sign in to comment.