<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RajaomalalaSendra</title>
    <description>The latest articles on DEV Community by RajaomalalaSendra (@rajaomalalasendra).</description>
    <link>https://dev.to/rajaomalalasendra</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F106693%2F92167e4e-ffd2-4a4c-ad16-96628aa1a617.JPG</url>
      <title>DEV Community: RajaomalalaSendra</title>
      <link>https://dev.to/rajaomalalasendra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajaomalalasendra"/>
    <language>en</language>
    <item>
      <title>Simple Hello World in React</title>
      <dc:creator>RajaomalalaSendra</dc:creator>
      <pubDate>Mon, 08 Oct 2018 10:44:12 +0000</pubDate>
      <link>https://dev.to/rajaomalalasendra/simple-hello-world-in-react-4nhe</link>
      <guid>https://dev.to/rajaomalalasendra/simple-hello-world-in-react-4nhe</guid>
      <description>

&lt;p&gt;First things to do is to install the node js if you don't have yet.&lt;/p&gt;

&lt;p&gt;here is the link: &lt;a href="https://nodejs.org/en/download/"&gt;install nodejs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then see the node version in the command line:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$node&lt;/span&gt; &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Alternatevely you can also install the yarn:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$npm&lt;/span&gt; &lt;span class="nb"&gt;install &lt;/span&gt;yarn &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="c"&gt;# -g stands for global&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then install the 'create-react-app' by the command:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$npm&lt;/span&gt; &lt;span class="nb"&gt;install &lt;/span&gt;create-react-app &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;When the create-react-app is installed, the next thing you need to do is:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$create&lt;/span&gt;&lt;span class="nt"&gt;-react-app&lt;/span&gt; hello-world
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;There will be a help there after installing:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$cd&lt;/span&gt; hello-world
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To see all the directory you can use the command:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;     &lt;span class="nv"&gt;$ls&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;Mac &lt;span class="nb"&gt;users &lt;/span&gt;and GNU/Linux &lt;span class="nb"&gt;users&lt;/span&gt;
     &lt;span class="nv"&gt;$dir&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;Widows &lt;span class="nb"&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You may find the directory: "usr/"&lt;/p&gt;

&lt;p&gt;After that you can use a text editor like: sublim text, atom or visual studio code.&lt;br&gt;
The command line is:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$subl&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;sublim text
&lt;span class="nv"&gt;$atom&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;atom
&lt;span class="nv"&gt;$code&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;visual studio code
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;But you can also open it in just for the right click.&lt;/p&gt;

&lt;p&gt;Return back to the command line you can use the command:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$npm&lt;/span&gt; start
or
&lt;span class="nv"&gt;$yarn&lt;/span&gt; start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Congratulation!!! If there is no error. You have just created your first app in reactjs.&lt;/p&gt;

&lt;p&gt;next things to do is to modify the App.js&lt;/p&gt;

&lt;p&gt;When we enter inside of it you can see these lines of code. Don't worry. You can know it after reading this post.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="sr"&gt;/.../&lt;/span&gt; &lt;span class="p"&gt;)}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then to get the Hello World application you can add the &lt;em&gt;jsx&lt;/em&gt; inside the /.../.&lt;br&gt;
To know more about the jsx you can find it in the link: &lt;a href="https://reactjs.org/docs/introducing-jsx.html"&gt;more about jsx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But jsx for the hello world we can use is:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt; Hello World 
&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After that the google chrome will refresh and you get the hello world application.&lt;/p&gt;

&lt;p&gt;For more documentation and help from community:&lt;br&gt;
you can visit these websites:&lt;/p&gt;

&lt;p&gt;&lt;a href="codepen.io"&gt;codepen&lt;/a&gt;&lt;br&gt;
&lt;a href="codesandbox.io"&gt;codesandbox&lt;/a&gt;&lt;br&gt;
or in &lt;a href="github.com"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you very much for your reading. See you next time.&lt;/p&gt;


</description>
      <category>helloworldinreactjs</category>
    </item>
  </channel>
</rss>
