خرید بک لینک

Vote count: 0

I'm trying to tu my React app into isomorphic app, everything seems fine, and very strange thing happen.

import fetch from 'isomorphic-fetch'
import request from 'axios';

The following case failed because the isomorphic-fetch retu only "pending" promised

export function fetchPosts() {
    retu {
        type:    RECEIVE_POSTS,
        promise: fetch(POSTS_URL + '?_embed=Idea')
    }
}

The following case passed because the axios retu data back

export function fetchPosts() {
    retu {
        type:    RECEIVE_POSTS,
        promise: request.get(POSTS_URL + '?_embed=Idea')
    }
}

Any tips on why that happen will be appreciated :)

asked 39 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 20 فروردين 1395 ساعت: 13:16

صفحه بندی