Technical requirements
Development of Amplify and React apps can be done in all major operating systems (OSes), such as Windows, macOS, and Linux, so you don't need to worry about which OS you should choose. The best OS is the one that you are most familiar with. Therefore, our commands and scripts will be focused on something that could be run across all platforms. First things first—you will need to install a code editor, a JavaScript runtime, and a package manager before you can start to develop React apps. These are the technologies and installations required for creating an AWS Amplify app with React and TypeScript:
- Install an open source cross-platform code editor. We would recommend using Visual Studio Code (VS Code) because VS Code and TypeScript are created by Microsoft, so TypeScript support is out of the box. For more information, visit https://code.visualstudio.com/.
- Alternatively, you could choose Atom, which is another very popular open source and cross-platform code editor out there, but you will need to install the TypeScript plugin yourself after installation. For more information, visit https://atom.io/.
- In order to download the TypeScript plugin for Atom, you can click the Install button on the following web page after you have installed the Atom editor:
- Install the open source cross-platform Node.js JavaScript runtime environment:
- Since Linux, Windows with Windows Subsystem for Linux (WSL 2), and macOS all support Homebrew, we will use Homebrew to install all of our dependencies. For more information, visit https://brew.sh/.
- Once you have installed Homebrew, you can use the following command to install Node.js:
brew install node
- Install an open source and cross-platform package manager for development. We could install it with an installer from the following link:
- Alternatively, we could use Homebrew to install Yarn by running the following command:
brew install yarn
Once you have completed all the preceding installation steps, you will then be ready to start developing AWS Amplify apps. Prior experience with TypeScript and React is not required, but you could go through a few tutorials by yourself if you are interested in studying the fundamentals of TypeScript and React. Further details are provided here:
- TypeScript documentation: https://www.typescriptlang.org/docs/home.html
- Hello World tutorial for TypeScript: https://code.visualstudio.com/docs/typescript/typescript-tutorial
- Tutorial and documentation for React: https://reactjs.org/
All the code and instructions in this book can be found at the following Uniform Resource Locator (URL):
https://github.com/PacktPublishing/Rapid-Application-Development-with-AWS-Amplify/tree/master/ch1
Important note
We will be using both the npm
and Yarn package managers to install dependencies, but npm
already comes with Node.js, so there is no need to install it separately. The reason behind this is some of the tools such as the Amplify CLI would have issues on Linux if we were to use Yarn but would not have issues with npm
, for some reason, so we will use what works across all OSes in this book.