From the course: React Native Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with images

Working with images - React Native Tutorial

From the course: React Native Essential Training

Start my 1-month free trial

Working with images

- [Instructor] For every item in this flat list, we want to render a new component to represent a single deal. So we'll call this component DealItem and we'll pass it the deal, which is just the item. And we'll go ahead and place this component deal item on at the same level. So DealItem. No longer using texts in here. And we'll now create new item. So dealitem.js. React class component which we named DealItem. So we need to work with the same prop types and React Native components. So I'll bring those in. DealItem. I probably don't need a flat list in deal items. So it's just view text. We're also going to render an image for every deal item. So we'll go ahead and bring in image just like that. So deal item receives single property so far. So we'll define a static prop types equal the property that this deal item receives is the deal items. So this is prop types dot, let's go with object for now and this as…

Contents