React JS Component - Creating a simple button

Опубликовано: 17 Июнь 2026
на канале: The Buggy Coder
37
3

This is the first part of a React JS tutorial series. We shall learn about react component through example in this video. We will be creating a simple react button whose size is configurable and supports a click handler.

We shall be following a test driven approach in all the videos. This means we shall write our test cases first and then we work on our react component till our tests succeed.

Environment Setup Instructions
~~~~~~~~~~~~~~~~~~~~~

1. Install Node js : https://nodejs.org/en/
2. Install VS Code: https://code.visualstudio.com/
3. Install git : https://git-scm.com/downloads

React JS Development setup
~~~~~~~~~~~~~~~~~~~
Once the above 3 components are installed, you have to install create-react-app by issuing the following command:

npm i create-react-app -g

This command will install create-react-app globally.