Redux-thunk: API response keeps pending
问题 I am trying to develop an application, that is showing photos from Unsplash given a keyword. I managed to fetch specific photos using unsplash.js. In my actions, I have several action creators: export const fetchPhotos = () => ({ type: FETCH_PHOTOS }); export const receivePhotos = term => { const unsplash = new Unsplash({ applicationId: "id", secret: "secret", callbackUrl: "callback" }); console.log(term); const response = unsplash.search .photos(term, 1, 20) .then(toJson) .then(json => json)