Skip to content

Instantly share code, notes, and snippets.

View React-Redux-Axios-refreshToken.ts
/**
Logic to refresh token automatically without showing error to our users
*/
axiosInstance.interceptors.response.use(
(response: AxiosResponse) => {
return response;
},
(error: AxiosError) => {
if (
View main.js
// Using commonjs js modules
import utils from './services/utils';
let array = [[1,2,[3]],4];
let newArray = utils.flat(array);
console.log(newArray);