React JS Hello world first application for the beginner

Votes : 5
You need Node JS to run React JS. If you have not already, You can download using this link.

React JS එක්ක වැඩ කරන්න නම් ඔබට Node JS ඔනෙ කරනවා. දැනට Node JS ඔබේ පරිඝණකය තුල ස්ථාපණය කර නැත්නම් මෙමගින් බාගත කරගන්න.
Step 1
Open a folder path which is needed to install React project.
අලුතින් React project එක ස්ථාපණය කරගත යුතු folder එකට යන්න.
Step 2
Type cmd into Address Bar and enter.
දැන් Address Bar ake cmd කියලා type කර enter කරන්න.
Step 3
Then open DOS inside folder path
එවිට එම path එකෙන් DOS open වෙයි.
Step 4
npx create-react-app helow_world
Type this code on DOS and enter. Create new folder as helow_world on that path and Started to download React libraries.
DOS වල type කරලා enter කරන්න. එවිට helow_world කියලා folder එකක් හැදිලා ඒ තුලට React libraries download වීම සිදුවේ.
Step 5
Run bellow code to move helow_wrold folder path before run your new React application.
React application එක run කරගන්න helow_wrold folder එකට යන්න වෙනවා. එකට පහල command එක run කරන්න.
cd helow_world
Step 6
Now you can start application by runing bellow command.
දැන් application එක start කරන්න පහල command එක run කරන්න.
npm start
Open App.js file on scr folder in your Code Editor software.
scr folder එක ඇතුලේ තියන App.js file එක Code Editor software එකකින් open කරගන්න.
Now change Welcome to React to Helow World
දැන් Welcome to React වාක්‍ය වෙනස් කරන්න Helow World කියලා.

Open your browser, Now you can see already changed page content without refreshing.
දැන් browser එකෙන් ගිහින් බැලුවොත් පිටුවේ වාක්‍ය වෙනස් වෙලා ඇති බව ඔබට දැකගත හැක. මේකට browser එක refresh කරන්න ඔනෙ වෙන්නෙ නෑ.

If you want to close application. Press ctr+ c keys. then show message Terminate batch job (Y/N)?. Type ( Y )
දැන් application එක close කරන්න නම් ctr+ c keys press කරන්න. එවිට එන ( Terminate batch job (Y/N)? ) සංවදයේදී ( Y ) කරන්න.
asked 4 months,13 days ago

What is the codrate ? is a standard, fast cross browsing and highly versatile site. It is useful for many large number of Program Development Industries. So you can get support form Codrators , who are the codrate's joiners around world to help your program developments, You can answer other codrator's questions. Communicate with them. Share your knowledge with them. Do you have an interest in programming, So publish your articles about programming. It will help to maintain your professional co-profile. Actually is not such as a regular web site. It will be gave new experience, best narrow cross-browser view, reduce processing time to receive browsing request, it's mean do not wasting your time to browsing codrate's web pages because it has been upgrade always modern coding ways. So, what do you waiting for ?. Try your own.

Copyright 2015 Pride - Company. Design by Esila