July 2018
Intermediate to advanced
164 pages
3h 15m
English
Servers and clients have different libraries that allow you to load data. In the browser, there are XMLHttpRequest and WhatWG Fetch API, and, on the server side, there are the Node.js default http and https packages. In order to load data universally (such as in an isomorphic manner,both on the server and on the client, using the same code base), we need to install an additional network layer.
There are two options here:
In order to do that, we should install a package:
$ npm install isomorphic-fetch --save
And then, we require/import it anywhere before fetch() ...
Read now
Unlock full access