Template setup
Before we continue defining the files for our live example, we need to tell StackBlitz how to interpret them. We can do it with a template
setting.
Our example is a React project, so we will use the create-react-app
template. This template will set up the project with the basic dependencies and configuration files.
Your task
Add the template: 'create-react-app'
option to the project configuration in the .openProject()
method.
When you click the “open” button in the preview, you can notice that the project now has a package.json
file, a content customized for a React project.
It’s time to put the actual React code in our project. Let’s move on to the next lesson!
Files
Preparing Environment
- Installing dependencies
- Starting http server