Commit 96589f40 authored by Paul Kaplan's avatar Paul Kaplan

Comment the useEffect usage

parent f40f3fa7
......@@ -10,9 +10,12 @@ import Debug from './debug.jsx';
const StudioActivity = ({items, loading, error, onInitialLoad}) => {
const {studioId} = useParams();
// Fetch the data if none has been loaded yet. This would run only once,
// since studioId doesnt change, but the component is potentially mounted
// multiple times because of tab routing, so need to check for empty items.
useEffect(() => {
if (studioId && items.length === 0) onInitialLoad(studioId);
}, [studioId]);
}, [studioId]); // items.length intentionally left out
return (
<div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment