Answer the question
In order to leave comments, you need to log in
Why is the useEffect hook being ignored?
Here is the code:
export default ({match}) => {
const {user, loading, repos, getUser, getRepos} = useContext(GithubContext)
const urlName = match.params.name
useEffect(() => {
getRepos(urlName)
}, [])
if(loading){
return <p className={"text-center"}>Загрузка</p>
}
const {
name, company, avatar_url,
location, bio, blog,
login, html_url, followers,
following, public_repos,
public_gists
} = user
return (
<div></div>
)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question