How to use isomorphic-fetch in typescript

Viewed 7443

I am getting error @types/isomorphic-fetch has no default export fetch

import fetch from 'isomorphic-fetch';

export const AUTH_FAIL = "AUTH_FAIL"
export const ERROR_FETCH = "EROR_FETCH";
export const SUCCESS_FETCH = "SUCESS_FETCH";
export const START_FETCH = "START_FETCH";

export function start_fetch(){ 
    return function(dispatch: any){
        return fetch("http://localhost:8000/api/data")
        .then(
            response => response.json()
        )
    }
}

thanks for your help.

1 Answers
Related