List restaurant data#2
Conversation
StanleySathler
left a comment
There was a problem hiding this comment.
It's perfect, buddy! 🌟 Well done! I've left a couple of comments to improve it a bit more.
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| .restaurantList { |
There was a problem hiding this comment.
There are a few methodologies that guide CSS development and classes naming convention. One of them is the BEM - Block, Element, Modifier. Further, you can read the naming page.
The best part about using both React and BEM is that, in React context, understanding what is a component and what is an element is a lot easier, as you usually do that when writing your own components.
As a plus for our project, I'd suggest you to adopt this methodology. It's not a hard methodology - you can learn it with a quick reading 🙏
In summary, only your components' root element will be treated as a Block. All the other elements inside your component will be treated as an Element.
| import React from 'react'; | ||
|
|
||
| const RestaurantCard = ({ restaurant }) => ( | ||
| <div> |
There was a problem hiding this comment.
To improve our semantic, I'd use article as the root element rather than div. I still have some questions about each tag introduced by HTML5, but I truly believe that article is the perfect element for this case. What do you think?
This PR allows users to see restaurant names, rates, food types, delivery times and delivery taxes.
Most important commits:
Set up app with Create React App
Assign IDs to restaurants
Add RestaurantListScreen component
Create RestaurantCard component to display restaurant data