<?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>Forem: Hidemichi Shimura</title>
    <description>The latest articles on Forem by Hidemichi Shimura (@hidemichishimura).</description>
    <link>https://forem.com/hidemichishimura</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%2F918145%2Fd0c78569-80e8-4197-9c3c-9624c2ad332d.jpg</url>
      <title>Forem: Hidemichi Shimura</title>
      <link>https://forem.com/hidemichishimura</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hidemichishimura"/>
    <language>en</language>
    <item>
      <title>First of all, what is JSX?</title>
      <dc:creator>Hidemichi Shimura</dc:creator>
      <pubDate>Fri, 10 Feb 2023 07:16:28 +0000</pubDate>
      <link>https://forem.com/hidemichishimura/first-of-all-what-is-jsx-nml</link>
      <guid>https://forem.com/hidemichishimura/first-of-all-what-is-jsx-nml</guid>
      <description>&lt;h2&gt;
  
  
  First of all, what is JSX?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;I see the term "JSX" here and there...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you are a web front-end developer wannabe, you might have learned steps by steps the basics of web development. You must have written some HTML code and created your first web page, added some styles to the page by CSS, added user interaction by using JavaScript, and so on. You know how to create a web page or website by utilizing what you have learned. It is so amazing that you can create your own web pages public to the world!&lt;/p&gt;

&lt;p&gt;Okay, so what's next? Let me guess what you will go for next. It should be "React," shouldn't it? React is such a popular library of JavaScript for UI, so there is no doubt why you will pick it.&lt;/p&gt;

&lt;p&gt;But once you dive in, you wii see the term "JSX" here and there. "What is JSX? I have never heard that before. I thought I had become a master of web development, but here comes mysterious stuff again..." That might be your thought that comes to your mind when you see it for the first time. Hey I got your back. Let me introduce a tip of What JSX is and help you have a great kickstart of learning React before diving in!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is JSX?
&lt;/h2&gt;

&lt;p&gt;JSX is a syntax extension of JavaScript. JSX looks exactly like HTML tags. You can use it just like HTML tags, but you can utilize JavaScript features at the same time because it is a syntax extension of JavaScript. There are more of good things about JSX. In this article I am introducing only a couple of useful ways that JSX brings. You use curly braces "{}" for JavaScript expression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;{text}&amp;lt;/h1&amp;gt;
&amp;lt;a href={url}&amp;gt;link&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use of variables
&lt;/h3&gt;

&lt;p&gt;You can use variable within JSX tags. Here's the example. You want to show a value of the variable called name within a p tag. In order to do that, you declare a variable called name and assign the variable to "John." You can use the value by inserting the variable embraced by curly braces within p tags. That works the same as the HTML example below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name = "John";
&amp;lt;p&amp;gt;{name}&amp;lt;/p&amp;gt; // Shows John
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;John&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use a variable to its attribute. Here you set the id attribute with the variable id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let id = "header";

&amp;lt;div id={id}&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="header"&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use an object as well.&lt;br&gt;
&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let obj = {name: "John"};

&amp;lt;p&amp;gt;{obj.name}&amp;lt;/p&amp;gt; // Shows John
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use of functions
&lt;/h3&gt;

&lt;p&gt;You can use a function within JSX. You define a function outside JSX and call it inside it with or without arguments just like how you have done so far. Let's try it out. Declare variables name1 and name2 with different values and a function &lt;em&gt;getWelocomeText&lt;/em&gt; that returns different welcome texts depending on its input. You can call the function within JSX with name1 or name2 and shows different texts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getWelcomText(name) {
if (name === "John") {
return "Hello, John";
} else {
return "Hello, Guest";
}

let name1 = "John";
let name2 = "Doe";

&amp;lt;p&amp;gt;{getWelcomText(name1)}&amp;lt;/p&amp;gt; // Shows "Hello, John"
&amp;lt;p&amp;gt;{getWelcomText(name2)}&amp;lt;/p&amp;gt; // Shows "Hello, Guest"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;"Hello, John"&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;"Hello, Guest"&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Generation of multiple similar elements
&lt;/h2&gt;

&lt;p&gt;Sometimes you need to write similar groups of elements over and over again in HTML, which is pretty hassling. This hassle can be removed by utilizing the built-in libraries of JavaScript. For example, array.map() is used to generate similar elements repeatedly but makes the code look simpler. Declare an array of strings which contains multiple names and use the map method to show all the names in the array with a p tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Names = ["John", "Doe", "Woo", "Foo"];
 {Names.map((name) =&amp;gt; (&amp;lt;p&amp;gt;{name}&amp;lt;/p&amp;gt;))}
// Shows  all the names in a row
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;John&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Doe&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Woo&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Foo&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;What did you think about JSX now? Do you feel less intimidated toward JSX? I hope so! JSX is NOT mandatory to use in React. Yet, JSX is commonly used because JSX looks simple and understandable to readers, which you will probably feel that same way as you learn. Therefore it is recommended to learn about it when you learn React. &lt;/p&gt;

&lt;p&gt;You can look more into JSX if you get interested.&lt;br&gt;
Let's keep learning and having fun with what we learn!&lt;/p&gt;

&lt;h2&gt;
  
  
  Further expertise
&lt;/h2&gt;

&lt;p&gt;Let me know more about JSX such as advanced uses or the other useful features of it other than the ones I mentioned here if you know! I am still learning JSX and React, and going to keep on learning. So I would really appreciate if you guys help me develop my skills further.&lt;/p&gt;

&lt;h3&gt;
  
  
  Attribution
&lt;/h3&gt;

&lt;p&gt;Cover image: &lt;a href="https://unsplash.com/@lautaroandreani" rel="noopener noreferrer"&gt;Lautaro Andreani&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>design</category>
      <category>productivity</category>
      <category>management</category>
    </item>
    <item>
      <title>Who Am I?</title>
      <dc:creator>Hidemichi Shimura</dc:creator>
      <pubDate>Thu, 01 Sep 2022 00:09:51 +0000</pubDate>
      <link>https://forem.com/hidemichishimura/who-am-i-312b</link>
      <guid>https://forem.com/hidemichishimura/who-am-i-312b</guid>
      <description>&lt;h2&gt;
  
  
  Hello! My name is Hidemichi Shimura
&lt;/h2&gt;

&lt;p&gt;I am a Japanese who was born and raised in Okinawa, which is a small island located in the southern part of Japan and has beautiful beaches, nature and delicious cuisines. I spent all of my life in the small island. Although I was there for my entire life, I am currently in Vancouver, Canada. Why am I in Canada, which is very far from Japan? And what am I doing there?&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do in Canada
&lt;/h2&gt;

&lt;p&gt;There are many reasons why people come to Canada. Then what about me? I am a student at Cornerstone International Community College of Canada, which is abbreviated to CICCC. My course at CICCC is &lt;strong&gt;Web and Mobile Development&lt;/strong&gt;. Maybe you can guess what I learn at school from the course name. Just as your guess, I learn programming for developing web sites, web applications, mobile applications and etc. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why I learn Web and Mobile Development in Canada
&lt;/h2&gt;

&lt;p&gt;The reason I decided to go to Vancouver for learning web and mobile development is that Vancouver's tech industry has been growing rapidly and attracting a number of engineers from other countries. Besides those facts, there is one more attractive thing to me. It is &lt;strong&gt;salary&lt;/strong&gt;💵. Software engineers in Vancouver tend to get paid well compared to ones in Japan. When I found out those facts, they instantly got my attention, made me decide to go to Vancouver and become a software engineer in Vancouver.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learn at school
&lt;/h2&gt;

&lt;p&gt;Let me tell you what I am actually learning and what I want to become in the future. I want to become a software engineer who can be engaged in various things at the later phase of my career. But for now, I am more interested in front-end development. Therefore I have been learning technical skills in regard to front-end development such as HTML, CSS and JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I want to become
&lt;/h2&gt;

&lt;p&gt;I am currently trying to become a front-end developer. But once I become a front-end developer and acquire years of experiences as a front-end developer, I want to learn about back-end development as well and shift to a back-end side. When I obtain experiences of both front-end and back-end, I would like to start my career as a full-stack developer. I have not made a decision of what I want to become after becoming a full-stack developer yet. But I might continue being a full-stack developer or dive into another field such as DevOps. But I am sure that I will experience a lot of things and figure out what I want to do next in the tech industry. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Goal
&lt;/h2&gt;

&lt;p&gt;One of the benefits to become a software engineer is that you can work from anywhere. You might be able to work from home, another work space, a cafe and maybe a beach. My goal is that I work from a beach. If I could work from a beach, I would finish work and dive into water right away. In order to make it come true, I am going to keep learning!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
