May 2018
Intermediate to advanced
470 pages
13h 54m
English
We will add a corresponding remove method in api-game.js to make a delete fetch request to the delete API.
mern-vrgame/client/game/api-game.js:
const remove = (params, credentials) => { return fetch('/api/games/' + params.gameId, { method: 'DELETE', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + credentials.t } }).then((response) => { return response.json() }).catch((err) => { console.log(err) }) }
With these game APIs in place, we can build out the React views for the application and also update the React 360 game view code to fetch and render dynamic game details.
Read now
Unlock full access