Khaledgarbaya / ContentfulReactNative-boilerplate

Boilerplate for using Contentful and React Native
MIT License
13 stars 3 forks source link

Grabbing ID as well as fields #1

Closed slawder closed 7 years ago

slawder commented 7 years ago

How would I grab the ID of a content row along with the fields? I can reference them in the

response.items.map

function by doing something like

post.sys.id

I can grab all of the actual post fields I want to render in a list view from post.fields and returning that in that particular function, but then am left without an ID to use to link to the actual content.

slawder commented 7 years ago

Nevermind. I was running into problems since the initial empty rows don't have data like post.sys.id, but if I check for it then get past it initially, things seem to work.

Khaledgarbaya commented 7 years ago

Hi @slawder sorry for the late response, Glad it worked for you. Feel free to create an issue anytime