title: useMemo on function used in .map statement
body: <p>I am pretty much new to hooks so have a question here:
  I have in React component function like </p>
  
  <pre><code>const getSection = assignmentSectionId =&gt; {
      const findSection = sections.find(
        section =&gt; section.sectionRefId === assignmentSectionId,
      );
  
      return findSection ? findSection.name : '';
    };
  </code></pre>
  
  <p>and now I got suggestion to use useMemo on that function. Currently I am using like:</p>
  
  <pre><code>return (
      &lt;List
        role="list"
        aria-label={ariaLabel}
      &gt;
        {assignments.map(assignment =&gt; {
          const sectionName = getSection(assignment.sectionId);
  
          return (
            &lt;Card
              name={sectionName}
            /&gt;
          );
        })}
      &lt;/List&gt;
    );
  };
  </code></pre>
  
  <p>What is the best(optimal) way to use useMemo here if it is possible?</p>