GroceriStar / react-only-intern-17

GNU General Public License v3.0
0 stars 0 forks source link

Master React, Quick Code tutorial. Part 2 #3

Closed atherdon closed 6 years ago

atherdon commented 6 years ago

Link to the first part of a tutorial on the next line https://medium.com/quick-code/lets-learn-react-chapter-2-what-the-hell-is-jsx-and-where-can-i-buy-it-5303a7db5117

Expected result

Test

1

chefigueroa-rodriguez commented 6 years ago

Chapter 2 got a little more interesting. I was introduced to JSX. JSK has 2 key abilities:

  1. Being able to create my own tags and use them.
  2. Write JavaScript inside of my HTML

// class App extends Component With the line of code above we are defining a React component. A component represents a part of your web app. For example if the web app has a header, footer, and content, but there can be as many components as you wish to create in your app.

Every component needs to implement a render method - in this method we are telling hoe the component should be rendered.

To write JavaScript code inside how HTML we need to use the brackets {}.

chefigueroa-rodriguez commented 6 years ago

I just pushed my code. Let me know what you think about my test, if there is another approach you might have done. Thanks.

atherdon commented 6 years ago

where is the days array?

chefigueroa-rodriguez commented 6 years ago

Since it wasn't a part of the test and only apart of the reading I assumed it wasn't supposed to be pushed with the test problem. I just added the days array and pushed it. Please let me know if everything looks good.

atherdon commented 6 years ago

ok, it's done.