Template Literals

We use template literals to concat string variables.

// ✅ function with template liberal
const greeting = 'Hello'
const subject = 'React Native'
const fullTitle = `${greeting} ${subject} !`

Later we add the content in a Text like this

// Hello React Native !

It's the same as using

// ❌ we don't want this
const fullTitle = greeting + ' ' + subject + '!'

Be the first to receive insightful articles and actionable resources that help you to elevate your skills.