I created a react application using the Accelerator toolkit and following this tutorial https://university.gooddata.com/gdui-starting-from-scratch-1
I am using a GoodData.CN instance.
After installing dependencies using ‘yarn install’ I ran the application using ‘yarn start’.
The application launched and the Welcome page opened but the page kept reloading continuously. By debugging a bit I found that the useEffect in AuthProvider in context.js causes this continuous refresh.
useEffect(() => {
const auth = async () => {
try {
await backend.authenticate();
onLoginSuccess();
} catch (err) {
// we do not care about the error in this context
onLoginError({});
}
};
auth();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Am I missing any settings in my GoodData.CN instance?
Best answer by jacek
View original