menu

Monday, April 3, 2017

Resolving fetchMock issues when testing isomorphic-fetch [Reactjs]

Hi peeps,

This is a quickie, and the content is totally reactjs.
If you are using fetchMock to simulate your API requests and you happend to use isomorphic-fetch for better support of fetch in browsers, you might have noticed that how fetchMock doesn't work. The solution is that you have to change the isomorphic-fetch import as below

import fetch from isomorphic-fetch

should be changed to

import isomorphic-fetch

This is highlighted in the fetchMock documentation.


4 comments:

  1. A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    Office Interior Designers in Coimbatore
    Office Interior Designers in Bangalore
    Office Interior Designers in Hyderabad

    ReplyDelete
  2. I am inspired with your post writing style & how continuously you describe this topic.
    Web Design Company in Chennai

    ReplyDelete

  3. i really like this blog.And i got more information's from this blog.thanks for sharing!!!!


    SEO Company in India

    ReplyDelete
  4. A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    Digital Marketing Company in Chennai

    ReplyDelete