title: Collapse SectionList section with animation
body: <p>I am usung <code>react-native</code> <code>SectionList</code> to display sectioned data (<a href="https://facebook.github.io/react-native/docs/sectionlist" rel="nofollow noreferrer">https://facebook.github.io/react-native/docs/sectionlist</a>). I added ability to collapse/expand sections on section header tap like:</p>
  
  <pre class="lang-js prettyprint-override"><code>const section1Collapsed, setSection1Collapsed = useState(false);
  
  const getListData = useMemo(() =&gt; {
    let data = [];
  
    if (section1Data &amp;&amp; section1Data.length) {
      data.push({
        title: 'Section 1',
        data: section1Collapsed ? [] : section1Data,
      });
    }
    if (section2Data &amp;&amp; section2Data.length) {
      data.push({
        title: 'Section 2',
        data: section2Data,
      });
    }
  
    return data;
  }, [section1Data, section2Data, section1Collapsed]);
  
  </code></pre>
  
  <p>and then I use these data in <code>SectionList</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;SectionList
    sections={getListData}
    ...restSectionListProps
  /&gt;
  </code></pre>
  
  <p>It works, but I wonder if there is any possibility to animate collapsing? 
  I added </p>
  
  <pre class="lang-js prettyprint-override"><code>  useEffect(() =&gt; {
      LayoutAnimation.easeInEaseOut();
    }, [section1Collapsed]);
  </code></pre>
  
  <p>And when I expand a section, it is animated. But when I want to collapse, there is no animation (which is normal for me, because I render section without data). Do you have any ideas how to add animation on collapse?</p>