If you only want to run the function given to useEffect after the initial render, you can give it an empty array [] as the second argument.
For example:
function MyComponent(){
useEffect(() => {
loadDataOnlyOnce();
}, []);
return <div> { /*...*/} </div>;
}