November 2017
Beginner to intermediate
398 pages
8h 42m
English
Before creating the component, we need some new data properties:
Add them in the state in the state.js file:
// The consolidated state of our appvar state = { // World worldRatio: getWorldRatio(), // Game turn: 1, players: [ { name: 'Anne of Cleves', }, { name: 'William the Bald', }, ], currentPlayerIndex: Math.round(Math.random()),}
We will use these properties to display the player names and the turn counter in the top bar.
Read now
Unlock full access