In this article on state management with context API, the author applies useMemo to useState return values this way:
function CountProvider(props) { const [