As a user, I should see all the messages in my chat component ( my messages and messages sent to me by other users). The chat component should update when new messages are added and the most recent message should be at the bottom of the page.
Acceptance Criteria
GIVEN a user comes to the site
WHEN they look at the chat component
THEN they should see all messages from all users
GIVEN a user is viewing, or entering in chat messages
WHEN a new message is entered by any user, and there are more messages than can fit in the default size of the chat history
THEN the most recent message should always be made visible at the bottom of the chat history
Developer Notes
Create chatBoxDomString function that contains the message, id, timeStamp, and userName
Print the chatBoxDomString to the id messages located in HTML
add a Axios GET request to messagesData.js that gets the messages.json data
export the Axios Get function and import it into the messages.js file
User Story
As a user, I should see all the messages in my chat component ( my messages and messages sent to me by other users). The chat component should update when new messages are added and the most recent message should be at the bottom of the page.
Acceptance Criteria
GIVEN a user comes to the site WHEN they look at the chat component THEN they should see all messages from all users GIVEN a user is viewing, or entering in chat messages WHEN a new message is entered by any user, and there are more messages than can fit in the default size of the chat history THEN the most recent message should always be made visible at the bottom of the chat history
Developer Notes
chatBoxDomString
function that contains the message, id, timeStamp, and userNamechatBoxDomString
to the idmessages
located in HTML