DEV Community

Cover image for Starting with ReactJS with fun
Md. Abdul Wahab
Md. Abdul Wahab

Posted on

Starting with ReactJS with fun

Firstly we're going to create a folder and named it with anything, Suppose, my folder name is "Tic-Tac-Toe Game" .
Now open this folder in VS code.
Now go to this folder directory
Image description

Now type "cmd" here as follow this snippets
Image description

When the command prompt will appear then type

npm install
Enter fullscreen mode Exit fullscreen mode

N:B: you have to install "nodejs" first

To install nodejs easily you can follow this link

Then you have to type:

npm install -g create-react-app
Enter fullscreen mode Exit fullscreen mode

To check if "create-react-app" is successfully installed type:

create-react-app --version
Enter fullscreen mode Exit fullscreen mode

Then for create a react app you have to create by following command:

create-react-app tic-tac-toe
Enter fullscreen mode Exit fullscreen mode

N:B: **you can use your own name**

That's all for successfully create your very first "** React App**"

Now we're going to develop a "Tic-Tac_Toe" game using React.
Here first check that your "React App" structure. I hope this will be like this:
Image description

And this is our folder structure:
Image description

We're going to copy this code to our "App.js" file:

export default function Square() {
  return <button className="square">Game</button>;
}

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.