-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 7.7.2
Yarn: Not Found
npm: 4.1.2
Watchman: 4.7.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.3934792
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.3 => 0.48.3
Steps to Reproduce
- Run the attached test with jest
Expected Behavior
No warning should be generated.
Actual Behavior
Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of `PickerIOS`.
in Unknown (created by PickerIOS)
in View (created by View)
in View (created by PickerIOS)
in PickerIOS
Reproducible Demo
import React from 'react';
import { PickerIOS } from 'react-native';
import renderer from 'react-test-renderer';
describe('StateLessMocks', () => {
it('generates a warning', () => {
const tree = renderer.create(<PickerIOS />).toJSON();
expect(tree).toMatchSnapshot();
});
});
davidbalivo, iyawnis, zhelyabuzhsky, rroehrig and PedramVeisi
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.