reapply TextInput es6 conversion with fixes, attemps to fix

Summary: D10515754 reapplied by backing out D12989604 and then fixed by manually forwarding the instance methods to the host function instead of using `forwardRef`. This also removes the need for the $flowFixMe.

Reviewed By: TheSavior

Differential Revision: D13048482

fbshipit-source-id: ff2447aff123e0960eddaef645f7dc976a426e14
This commit is contained in:
Spencer Ahrens
2018-11-15 20:42:47 -08:00
committed by Facebook Github Bot
parent a00940693e
commit 9ea1295179
6 changed files with 864 additions and 735 deletions

View File

@@ -12,12 +12,11 @@
'use strict';
const React = require('React');
const ReactTestRenderer = require('react-test-renderer');
const TextInput = require('TextInput');
import Component from '@reactions/component';
const {enter} = require('ReactNativeTestTools');
const {enter, renderWithStrictMode} = require('ReactNativeTestTools');
jest.unmock('TextInput');
@@ -29,7 +28,7 @@ describe('TextInput tests', () => {
beforeEach(() => {
onChangeListener = jest.fn();
onChangeTextListener = jest.fn();
const renderTree = ReactTestRenderer.create(
const renderTree = renderWithStrictMode(
<Component initialState={{text: initialValue}}>
{({setState, state}) => (
<TextInput