Category "react-usememo"

Can a useMemo memoized value be updated with useEffect from within the component?

I'm trying to render data that must be passed through useMemo. I get the data from an api call so I call useEffect. The initial render works returning an empty

Load JSON data with useMemo

In the following line: it loads the json data using useMemo import MOCK_DATA from './MOCK_DATA.json' const data = useMemo(() => MOCK_DATA, []) As it's menti