Starting with ReactJS with fun

md_abdul_wahab

Md. Abdul Wahab

Posted on June 15, 2024

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
πŸ’– πŸ’ͺ πŸ™… 🚩
md_abdul_wahab
Md. Abdul Wahab

Posted on June 15, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Starting with ReactJS with fun
javascript Starting with ReactJS with fun

June 15, 2024

Intro to React Hooks
javascript Intro to React Hooks

April 29, 2024

Make React from scratch for fun
javascript Make React from scratch for fun

June 24, 2023