Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Components and State - Part 1

Aryan Naimi
Aryan Naimi
6,050 Points

No Text Field

Hi guys,

When I do <TextInput style={styles.textInput}> it does not create a text field like the one shown in the video. It instead shows me just shows me something like this -> | in blue. However, when I type in a number it shows the total tip.

Anyone help? Thank you

Michael Vilabrera
Michael Vilabrera
Courses Plus Student 11,252 Points

the same happened to me- you have to set the width:

textInput: {
      textAlign: 'left',
      color: '#333333',
      margin: 5,
      height: 50,
      width: 200,
      borderColor: '#60b7e2',
      borderWidth: 1
  },