S
S
Shakir Darion2020-09-12 09:36:47
React
Shakir Darion, 2020-09-12 09:36:47

'globalThis' is not defined?

const Darko = () => {
  const history = useHistory();
  const [logout, { loading, error }] = useMutation(LOGOUT, {
    onCompleted: () => {
      history.push("/");
      globalThis.location.reload();
    },
    fetchPolicy: "no-cache",
  });
  return <div>...</div>}


Why am I getting the error 'globalThis' is not defined ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question