title: Is it possible to define calculated state variable in React?
body: <p>In languages like C# it's possible to have a property which is based on other properties. Let us suppose we have <code>Name</code> and <code>Surname</code> properties. We can then define <code>DisplayName</code> property</p>
  
  <pre><code>get { return $"{this.Name} {this.Surname}"; }
  </code></pre>
  
  <p>I'm wondering if this is somehow possible in React, with state properties. It's legal to define a function as a value of state variable:</p>
  
  <pre><code>state = {
    isSomethingTrue: function() {
      return true;
    },
  };
  </code></pre>
  
  <p>However then we need to execute this function to get the value. Is there any way to do it in this way that calling <code>this.state.isSomethingTrue</code> will just return the calculated value?</p>