Exercise
Last updated
Last updated
To practice using JSX and embedding expressions with JSX, let's try creating a notification bell element that can transition between three different states:
When there are no notifications, we want to only display the notification icon.
If there are less than 99 notifications, we'll want to display the icon and notifications badge.
If there are more than 99 notifications, we'll want to truncate the number of notifications shown on the badge and only display 99+
, and we'll want to add an has-fire
class to the notification badge to display the flames.