Decide which SSR Data Fetching Library to use #258
Comments
Pinging @vaibhavsingh97 @joelrozen @ThomasRoest @xarielx @Haxified for help resolving this decision. |
Another one to consider is SWR (https://github.com/zeit/swr) which, given we are using zeit's next.js anyway, may be the better way to go. |
@joelrozen SWR is a wrapper around any fetch function so that isn't what we're looking for, since we still need to provide a |
@Zeko369 ahhhh ooops. |
Personally, I would like to work with
NextJS supports conditional imports:
|
+1 |
There seems to be support for from @Zeko369, @Shub1427 @nik-john about cross-fetch (a wrapper around node-fetch and whatwg-fetch) @Sonicrida @joelrozen any opposition? |
cross-fetch 100% |
I'm pretty indifferent about which library is chosen as long as it fulfills all our needs |
I'd prefer to use cross-fetch |
Ok closing this as @Shub1427 Hopefully this unblocks you |
Do we have the criteria for selection? There seem to be a lot of opinions and they're based on a variety of criteria. If we start with a prioritised list of requirements and desires I think we'll find it easier to reach an objective consensus. Sorry, I didn't spot that this was closed. Could we retrospectively define the criteria we used for the selection? |
@bernhard-hofmann It's pretty straight forward - because we're going to use this library extensively on Chapter (in no particular order):
|
List of Libraries that has been discussed till date:
@Zeko369 suggested, respective to PR #140, we are already using
isomorphic-fetch
@Sonicrida suggested
axios
is not maintained for a while and has some security vulnerabilities.@Shub1427 concluded that
isomorphic-fetch
,isomorphic-unfetch
andaxios
hasn't been maintained for a long period, though recently from Septemberaxios
has a new core developer helping to resolve issues as fast as he could.Regarding security vulnerability for axios, it was a false alarm as per this.
@nik-john suggested to use
cross-fetch
which seems a viable option, as it's being actively maintained, and is a wrapper aroundnode-fetch
andwhatwg-fetch
(which I was trying to do by myself in PR #166).This discussion needs to be concluded, as the PR #166 is been on hold for a long time now due to this and acts as a blocker to the same.
The text was updated successfully, but these errors were encountered: