Skip to content

List restaurant data#2

Open
leandrocollares wants to merge 8 commits intomasterfrom
feat/add-restaurant-list
Open

List restaurant data#2
leandrocollares wants to merge 8 commits intomasterfrom
feat/add-restaurant-list

Conversation

@leandrocollares
Copy link
Copy Markdown
Contributor

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

@leandrocollares leandrocollares changed the title Lists restaurant data List restaurant data Jun 4, 2019
Copy link
Copy Markdown
Member

@StanleySathler StanleySathler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's perfect, buddy! 🌟 Well done! I've left a couple of comments to improve it a bit more.

Comment thread src/App.css
to {
transform: rotate(360deg);
}
.restaurantList {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants