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

Unnecessary Warning for ViewPagerAndroid #16343

Closed
Palisand opened this issue Oct 12, 2017 · 1 comment
Closed

Unnecessary Warning for ViewPagerAndroid #16343

Palisand opened this issue Oct 12, 2017 · 1 comment
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Palisand
Copy link

Palisand commented Oct 12, 2017

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

  1. 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>
    );
  }
}
  1. 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.

@stale
Copy link

stale bot commented Dec 11, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 11, 2017
@stale stale bot closed this as completed Dec 18, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

1 participant