I have decided to break down the Text into smaller chunks. Now, my goal is to further divide it into individual letters/characters and then expand this splitting process to include an array within the content.
Take a look at my custom React code:
import React from "react";
import "./styles.css";
import content from "./content";
// Dividing Texts
const DivideText = React.memo(({ str }) => {
return (
<div>
{str.split(" ").map((item, index) => {
return <div key={index}>{item}</div>;
})}
</div>
);
});
// Main Application
export default function App() {
return (
<div className="App">
<h1>
<DivideText str={"Lucie Bachman"} />
</h1>
<h2>
<DivideText str={"Hey, I'm sharing my initial post on StackOverflow!"} />
</h2>
</div>
);
}