tkh44 / holen

Declarative fetch for React
MIT License
150 stars 16 forks source link

Holen's isomorphic-unfetch collide with application's isomorphic-unfetch #7

Closed thangngoc89 closed 6 years ago

thangngoc89 commented 7 years ago

I'm developing an isomorphic app with Next.js and React.js. I have isomorphic-unfetch imported globally like this

import "isomorphic-unfetch`;

in every page.

When I import Holen to a page (any page), it will throw an error say that fetch is undefined even on browser that have native fetch.

Removing the import either in Holen's code or in my application's code will "fix" the error.

So I think that Holen should require user to have fetch polyfill globally available instead of importing the polyfill directly.

Thoughts?

tkh44 commented 7 years ago

Sure put in a PR.