title: ReactJS: setTimeout() not working inside return?
body: <p>Inside of render(), return(), I am trying to set a timeout but it's not working.</p>
  <p>Am I doing something wrong?</p>
  <pre><code>{setTimeout(() =&gt; {
            filtered.length &amp;&amp; (
              &lt;FilterListContainer
                containerHeight={this.state.filterContainerHeight}
              &gt;
                &lt;FilterListScroll&gt;
                  &lt;FilterList ref={this.filterListRef}&gt;
                    {filtered.map((k) =&gt; (
                      &lt;SidebarFilter
                        key={k}
                        type={k}
                        filter={this.props.body_search_filter[k]}
                        handleChange={this.handleFilterChange}
                      /&gt;
                    ))}
                  &lt;/FilterList&gt;
                &lt;/FilterListScroll&gt;
              &lt;/FilterListContainer&gt;
            );
          }, 1)}
  </code></pre>