-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Is this a bug report?
Yes.
Have you read the Contributing Guidelines?
Yes.
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 1.0.1
npm: 4.6.1
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: ^16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3
Steps to Reproduce
- Run an app with the following code on your Android device:
import React, { Component } from 'react';
import { ViewPagerAndroid } from 'react-native';
const Page = () => <View />;
const Pager = ({children}) => <ViewPagerAndroid>{children}</ViewPagerAndroid>;
export default class App extends Component {
render() {
return (
<Pager>
<Page />
<Page />
</Pager>
);
}
}
- Observe warning.
Expected Behavior
There should be no warning as Page
renders a View
.
Actual Behavior
Warning:
Each ViewPager child must be a <View>. Was Page.
Reproducible Demo
Unavailable. Issue exists on RN 0.49. Expo SDK 21 uses 0.48.
Metadata
Metadata
Assignees
Labels
StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.