Skip to content

Instantly share code, notes, and snippets.

@meetzaveri
Last active October 18, 2020 11:37
Show Gist options
  • Save meetzaveri/a02c35e33db3607ce4fbab2e20742043 to your computer and use it in GitHub Desktop.
Save meetzaveri/a02c35e33db3607ce4fbab2e20742043 to your computer and use it in GitHub Desktop.
import React, { useEffect } from 'react';
const Container = () => {
const userInfo = props.userInfo;
const makeAPICall = () => {
// do your async actions, side effects or network effects
}
useEffect(makeAPICall,[userInfo])
return (<div>Example</div>);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment