performance-tutorial/src/components/App/App.js

import React from 'react';
import './App.css';

function App() {
  return(
    <div className="wrapper">
      <label htmlFor="text">
        <p>Add Your Text Here:</p>
        <textarea
          id="text"
          name="text"
          rows="10"
          cols="100"
        >
        </textarea>
      </label>
    </div>
  )
}

export default App;
performance-tutorial/src/components/CharacterMap/CharacterMap.js

import React from 'react';
import PropTypes from 'prop-types';

export default function CharacterMap({ text }) {
  return(
    <div>
      Character Map:
      {text}
    </div>
  )
}

CharacterMap.propTypes = {
  text: PropTypes.string.isRequired
}
Now import the component and render inside of App.js. Open App.js:

nano src/components/App/App.js
performance-tutorial/src/components/App/App.css

.wrapper {
    padding: 20px;
}

.wrapper div {
    margin: 20px 0;
}

Recommend

How To Avoid Performance Pitfalls in React with memo, useMemo, and useCallback Step 1 — Preventing Re-renders with memo Building a Text Analyzer

Установка PostgreSQL в Ubuntu 20.04 [Краткое руководство] Шаг 5 — Открытие командной строки Postgres с новой ролью

Установка PostgreSQL в Ubuntu 20.04 [Краткое руководство] Шаг 4 — Создание новой базы данных

Установка PostgreSQL в Ubuntu 20.04 [Краткое руководство] Шаг 3 — Создание новой роли

Установка PostgreSQL в Ubuntu 20.04 [Краткое руководство] Шаг 2 — Использование ролей и баз данных в PostgreSQL

Установка PostgreSQL в Ubuntu 20.04 [Краткое руководство] Шаг 1 — Установка PostgreSQL

What is FTP and How Is It Used? See More Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

What is FTP and How Is It Used? Next Steps:

Como Instalar e Utilizar o Docker: Primeiros passos Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

Como Instalar e Utilizar o Docker: Primeiros passos

How To Use OAuth Authentication with DigitalOcean as a User or Developer Using OAuth to Authenticate Users as a Developer Implementing DigitalOcean OAuth in your Application

How To Construct Classes and Define Objects in Python 3 Prerequisites Still looking for an answer?

How To Construct Classes and Define Objects in Python 3 Working with More Than One Object

How To Construct Classes and Define Objects in Python 3 The Constructor Method

How To Construct Classes and Define Objects in Python 3 Objects

How To Construct Classes and Define Objects in Python 3 Classes

Cara Menginstal PostgreSQL pada Ubuntu 20.04 [Mulai Cepat] Langkah 5 — Membuka Prompt Postgres dengan Peran Baru

Cara Menginstal PostgreSQL pada Ubuntu 20.04 [Mulai Cepat] Langkah 4 — Menciptakan Basis Data Baru

Cara Menginstal PostgreSQL pada Ubuntu 20.04 [Mulai Cepat] Langkah 3 — Menciptakan Peran Baru

Cara Menginstal PostgreSQL pada Ubuntu 20.04 [Mulai Cepat] Langkah 2 — Menggunakan Peran dan Basis Data PostgreSQL

Cara Menginstal PostgreSQL pada Ubuntu 20.04 [Mulai Cepat] Langkah 1 — Menginstal PostgreSQL

How To Set Up Gmail with Your Domain on DigitalOcean Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

Installieren von Discourse unter Ubuntu 18.04 Schritt 3 — Registrieren eines Administratorkontos