;div&gt;Initial content&lt;/div&gt;
</code></pre>
<p>For class components, the state is an instance of the class, set right after the constructor is called.</p>
<p>For closure components, the state is the object returned by the closure, set right after the closure returns. The state object is mostly redundant for closure components (since variables defined in the closure scope can be used instead).</p>
<h4 id="via-vnodestate"><a href="#via-vnodestate">Via vnode.state</a></h4>
<p>State can also be accessed v