# React 18 for Beginners - Bug with the Platforms filter

**URL:** <https://forum.codewithmosh.com/t/react-18-for-beginners-bug-with-the-platforms-filter/21583>\
**Category:** React\
**Created:** [July 18, 2023, 4:30pm UTC](https://forum.codewithmosh.com/t/react-18-for-beginners-bug-with-the-platforms-filter/21583 "2023-07-18T16:30:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratman999](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/ratman999/32/6691_2.png) [@ratman999](https://forum.codewithmosh.com/u/ratman999)\
**Post date:** [July 18, 2023, 4:30pm UTC](https://forum.codewithmosh.com/t/react-18-for-beginners-bug-with-the-platforms-filter/21583/1 "2023-07-18T16:30:02Z")

</div>

After building the games app and checking a few things out I had noticed that the Platforms dropdown wasn’t doing what it was supposed to do.

When I click on a platform, say, XBOX- I don’t even see the XBOXicon in the PlatformList (other platforms appear, but not XBOX).

This is because of the response we get back from the [rawg.io](http://rawg.io) API:

{  
“id”: 3,  
“name”: “Xbox”,  
“slug”: “xbox”,  
“platforms”: [  
{  
“id”: 1,  
“name”: “Xbox One”,  
“slug”: “xbox-one”  
},  
{  
“id”: 186,  
“name”: “Xbox Series S/X”,  
“slug”: “xbox-series-x”  
},  
{  
“id”: 14,  
“name”: “Xbox 360”,  
“slug”: “xbox360”,  
},  
{  
“id”: 80,  
“name”: “Xbox”,  
“slug”: “xbox-old”  
}  
]  
}

In this scenario, we build the platforms selector using the parent id - which is 3. Then we search for games with a Platform Id of 3 - but REALLY, we should be searching for Games with a Platform Id of 1, 186, 14 or 80 - but I believe in this case, Id = 3 corresponds to iOS games

Example of this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/289b968504c0b9f1ed7aabdd1f0253321e76cc4b.jpeg)

Anyway, I hope this helps - not an issue with the content Mosh has provided (awesome btw) - but just something I had noticed.

---

<div class="post-metadata">

**Author:** ![Vincejim](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@Vincejim](https://forum.codewithmosh.com/u/Vincejim)\
**Post date:** [August 4, 2023, 9:54am UTC](https://forum.codewithmosh.com/t/react-18-for-beginners-bug-with-the-platforms-filter/21583/2 "2023-08-04T09:54:40Z")

</div>

I also noticed this issue. Is there anything we can do to fix it?

---

<div class="post-metadata">

**Author:** ![bradenontherun](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@bradenontherun](https://forum.codewithmosh.com/u/bradenontherun)\
**Post date:** [November 3, 2023, 2:25am UTC](https://forum.codewithmosh.com/t/react-18-for-beginners-bug-with-the-platforms-filter/21583/3 "2023-11-03T02:25:41Z")

</div>

It is most likely because you are grabbing the all platforms instead of the “parent\_platforms” set your game interface for the platforms to be parent\_platforms: {platform: Platform}
