React-native: Trying to add a 'ReactVirtualTextShadowNode' to a 'LayoutShadowNode'

Created on 21 Oct 2017  Â·  3Comments  Â·  Source: facebook/react-native

Someone with this issue on 
react-native: 0.49.3?

Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'ReactVirtualTextShadowNode' to a 'LayoutShadowNode')

import React from 'react';

import { TextInput, View, Text } from 'react-native';

const Input = ({ label, value, onChangeText, placeholder, secureTextEntry }) => {
  const { inputStyle, labelStyle, containerStyle } = styles;

  return (
    <View style={containerStyle}>

      <Text style={labelStyle}>{label}</Text>
      <TextInput
        secureTextEntry={secureTextEntry}
        placeholder={placeholder}
        style={inputStyle}
        value={value}
        onChangeText={onChangeText}
       autoCorrect={false}
      />

    </View>
  );
};

const styles = {
  inputStyle: {
    color: '#111',
    paddingRight: 5,
    paddingLeft: 5,
    fontSize: 15,
    lineHeight: 20,
    flex: 2
  },
  labelStyle: {
    fontSize: 18,
    paddingLeft: 20,
    flex: 1
  },
  containerStyle: {
    height: 45,
    flex: 1,
    flexDirection: 'row',
    alignItems: 'center'
  }
};

export { Input };

Ran Commands Locked

Most helpful comment

@dcalixto did you figure this out?

All 3 comments

@facebook-github-bot no-template

Hey @dcalixto, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!

How to Contribute • What to Expect from Maintainers

@dcalixto did you figure this out?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phongyewtong picture phongyewtong  Â·  3Comments

josev55 picture josev55  Â·  3Comments

jlongster picture jlongster  Â·  3Comments

despairblue picture despairblue  Â·  3Comments

lazywei picture lazywei  Â·  3Comments