React Lesson 2: Homework Assignment

artwork depicting stylized React logo

Hopefully, all’s going well!

Let’s check our home task. The main reason of using React lies in the ability to create components based on your functionality set, i.e. to divide the whole app into small independent parts. In our case, we need to make comments our independent component. It will also be great to practice the skill of creating as many stateless components as possible. One of the examples in this scenario is the comment.js file.

CommentList.js

Our file named Articles.js will change in the following way:

This is how our home task coding will look like. You can download the file with the updated project from our repository or just copy it. Our next assignments will continue in this file.

a mockup web page of our blog at blog.soshace.com

React lessons can be viewed here: https://soshace.com/category/javascript/react/react-lessons/

About the author

Stay Informed

It's important to keep up
with industry - subscribe!

Stay Informed

Looks good!
Please enter the correct name.
Please enter the correct email.
Looks good!

Related articles

React Lesson 15: Checking Homework progress from Lesson 14

Today, we are going to cover homework from Lesson 14 and add comment API to load comments. ...

React Lesson 14: Redux Thunk Deep Dive

In this lesson, we will understand the internals of Redux Thunk and the use cases where we should use ...

React Lesson 13 Part 2: Asynchronous actions

In the previous article, we used Redux Thunk and learned how to structure actions for asynchronous calls. Now we will update reducer to handle them ...

1 comment

infocampus logics August 5, 2020 at 8:25 am
0

Everyone loves it when people come together and share views. Great blog, keep it up!

Sign in

Forgot password?

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy

Password recovery

You can also try to

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy