kmurali krishna
kmurali krishna

Reputation: 23

why TSX file is reading the conditions like a normal text? how to check using if else condition over TSX file

I just want to test to validate using If... else if condition

Here is the peace of code to test the condition, mylists.Title returns the SP lists,

if({mylists.Title} === {'Documents'})
  {
    <span>{'Good morning'}</span>
  } else 
  {
    <span>{'Good Evening'}</span>
  }

but its considering like a normal text enter image description here

I know that i am just checking very simple condition only but really don`t understand here why its considering as normal string

Please assist me here how to validate using if ...else if condition over TSX file

Upvotes: 0

Views: 39

Answers (0)

Related Questions