liveBook · Manning

Template

As explained in React Quickly, Second Edition

A template is a declarative document or markup structure containing placeholders or directives for generating user-interface output.

A React project template is a starter setup that gives a new app a chosen set of files, dependencies, or configuration. Pick one when the default setup does not match the project you want to build. section 2.1.3

Common starting points include:

  • Minimal templates, with fewer files and features than the default. section 2.1.3
  • TypeScript variants, for starting a project with TypeScript. section 2.1.3
  • Dependency-rich boilerplates, such as a Redux and TypeScript setup. section 2.1.3
$ npx create-react-app name-of-app --template name-of-template

Use this command pattern to create an app from an existing named template. section 2.1.3

Starting a website-menu project

A prepared menu scaffold includes application components and supporting files. A minimal alternative keeps the icons and stylesheet but leaves the custom components for you to create. section 11.1.5

How React Quickly, Second Edition covers it

How deep it goes
Compares minimal, typed, and dependency-rich starters, but does not detail how to create a custom template.
Examples
Compares default and minimal starters, TypeScript variants, Redux boilerplate, and a website-menu scaffold.
What you can do after
Operate/configure: create a React app from a named Create React App template or start from a prepared menu scaffold.
How it connects
Connects templates to Create React App, TypeScript, Redux, and project scaffolds.

Also explained in

Compare how 21 books explain template →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of React Quickly, Second Edition. The section links point to the parts of the book it draws on.