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}