From 22ea06415d142c8560a67d946cc362e86d199053 Mon Sep 17 00:00:00 2001 From: Spencer Lochne Date: Mon, 9 Jun 2025 15:28:33 -0400 Subject: [PATCH] 11b Solution --- 2-copy-of-code/lesson-11/chatbot-project/src/App.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/2-copy-of-code/lesson-11/chatbot-project/src/App.jsx b/2-copy-of-code/lesson-11/chatbot-project/src/App.jsx index b701ff1..bddda9f 100644 --- a/2-copy-of-code/lesson-11/chatbot-project/src/App.jsx +++ b/2-copy-of-code/lesson-11/chatbot-project/src/App.jsx @@ -26,9 +26,17 @@ function App() { // const chatMessages = array[0]; // const setChatMessages = array[1]; + // Note: in React, {chatMessages.length} Messages + // counts as putting 2 pieces of text in like this: + // <title>{chatMessages.length} {'Messages'} + // + // The element may not support this. That's why we + // save it in a variable first and insert it as 1 text. + const title = `${chatMessages.length} Messages`; + return ( <> - <title>Chatbot Project + {title}