What's a template?

templates are a way to display information on the user's browser. It aims to describe what we want to show.

For example, the following templates of the different existing frameworks aim to say Hello to somebody. It's easy to read and informative.

There is no "way to go" while dealing with templates and template engines. Every framework implements its own system. But the interesting thing is that they all use a superset of HTML (declarative programming).

Template in Vuejs

<template>
	<span>Hello {{firstname}} {{lastName}}</span>
<template>

Template in Angular

It's the same syntax as Vuejs

<template>
	<span>Hello {{firstname}} {{lastName}}</span>
<template>

Template in React

Templating in React is made using an extension of Javascript called JSX to display information.

const Component = ({ firstName, lastName }) => (
  <span>
    Hello {firstName} {lastName}
  </span>
);