title: Compare String const value in React JS
body: <p>I have this code in React Js but the flagImg is equal with the 2nd value (GRFlag). I think that is the way that I am trying to compare the 2 strings to the problem. Does anyone help?</p>
  <pre><code>const [lan ,setLan] = React.useState(&quot;GR&quot;);
  const flagImg = {lan} === &quot;GR&quot; ? &lt;UKFlag style={{width: &quot;40px&quot;}}/&gt; : &lt;GRFlag style={{width: &quot;40px&quot;}}/&gt;;
  </code></pre>