I have read the hikr-tutorial where the hikes-data is hardcoded. How would the Backend.js file look like if the hiker-data came from an api like http://api.hikr.com/get?
And what about the Context.js? Any changes there? As I understand you should not need to change the Context-file, only the Backend-file?
There are examples of fetch, but not like the hikr-tutorials use of Promise.
This is the example from hikr Backend.js:
var hikes = [
{
id: 0,
name: "Tricky Trails",
location: "Lakebed, Utah",
distance: 10.4,
rating: 4,
comments: "This hike was nice and hike-like. Glad I didn't bring a bike."
},