Heads up! To embark on an Adventure or participate further, sign in with your Treehouse account or enroll in your free, 7-day trial.

Treehouse Code Adventures > Message Reactions Component

Message Reactions Component

Message Reactions Component

Ever notice on iMessage or other various messaging services, you can pin your favorite conversations? This Code Adventure will allow you to write the functionality to do just that. Use any tech you'd like; vanilla JavaScript, React, Vue, etc. to build out a message pins component!

Desktop icon

Created: 04/26/2024 by Dustin Usey

Skill level: advanced

Topics used: HTML CSS JavaScript

Estimated completion time: 6 hours

    Ever notice on iMessage or other various messaging services, you can pin your favorite conversations? This Code Adventure will allow you to write the functionality to do just that. Use any tech you'd like; vanilla JavaScript, React, Vue, etc. to build out a message pins component!

  1. 0

    To begin, click "Start Adventure" at the top of the page and then download your starter files.

  2. 1

    Follow the mockups to replicate as best you can a reactions component with which is populated with emojis from an emoji API.

  3. 2

    Add logic to allow the user to select an emoji from a list of emojis. Upon selecting that emoji, it appears at the bottom of another user's message. You should be able to add multiple emojis.

  4. 3

    As always, ensure that the code is accessible and adheres to WCAG standards.

  5. 4

    Extra Challenge: Allow a "history" or "most popular" emoji view that users can use to select recently/frequently used emojis.

  6. 5

    Extra Challenge: Use localstorage to save history/frequently used emojis.

  7. 6

    Extra Challenge: Allow users to search for an emoji by keyword.