Hi I have been working and troubleshooting this for a couple of days now. What I want is to loop through the items I selected in my component and print them on the app (it will be searchable but that will be later) - I did this fine with another API so I decided to give the Reddit one a go.
I mapped correctly but nothing was showing up , so I looked at the JSON and made an if else loop but now I am getting an error (it may be in the wrong js file)
APP JS is below - I am torn between if I should loop by mapping OR with a while statement since mapping seemed to just get one array and I want all nested arrays.
Current Idea:
{subs.map(subs =>{
while(i=0, i < 28, i++){
(<Subreddit
title={subs.title}
/> });
previous: {subs.map(subs =>
(<Subreddit
title={subs.children.name}
subreddit={subs.children.subreddit}
post={subs.children.data.selftext}
url={subs.children.data.url}
/> )) }