memoized component function added, but was slower in practice
memoized componentFunction created, slower in practice