Before we can create our React app, we need to set the project directory and install the dependencies for our app, as follows:
- Create a new React app called Currency-Exchange using npx, like this:
npx create-react-app Currency-Exchange
- Update your package.json to the following values:
{
"name": "Currency-Exchange",
"version": "1.0.0",
"private": false,
"dependencies": {
"bulma-start": "0.0.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-scripts": "1.1.4",
"stellar-sdk": "^3.0.0",
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
- Run npm install on the terminal window to install the dependencies.
Next, within the src folder, create a Components folder for the app components. Also, create an Assets folder within src. We'll be using this to map the assets being used by the app.