[React] Close the menu component when click outside the menu

Most of the time, your components respond to events that occur within the component tree by defining their own handler or by accepting a handler defin

[React] Style the body element with styled-components and "injectGlobal"

In this lesson, we see how we can apply styles globally with the "injectGlobal" helper method in styled-components. This method allows us to apply sty

[React] Style a React component with styled-components

In this lesson, we remove the mapping between a React component and the styles applied to it via classnames. We write our styles directly within the c

[React Intl] Use a react-intl Higher Order Component to format messages

In some cases, you might need to pass a string from your intl messages.js file as a prop to a component. Instead of using react-intl&nb

[React Intl] Render Content Based on a Number using react-intl FormattedMessage (plural)

Using the react-intl FormattedMessage component, we’ll learn how to render content conditionally in our messages based on a numbe

[React Intl] Format Numbers with Separators and Currency Symbols using react-intl FormattedNumber

Using a react-intl FormattedNumber component, we'll pass a Number and a few additional props in order to render the correct separator a

[React Intl] Format a Date Relative to the Current Date Using react-intl FormattedRelative

Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2

[React Intl] Format Date and Time Using react-intl FormattedDate and FormattedTime

Using the react-intl FormattedDate and FormattedTime components, we’ll render a JavaScript Date into both a date string

[React Intl] Render Content with Markup Using react-intl FormattedHTMLMessage

In this lesson, we’ll use the react-intl FormattedHTMLMessage component to display text with dynamic values along with other HTML

[React Intl] Render Content with Placeholders using react-intl FormattedMessage

Learn how to use react-intl to set dynamic values into your language messages. We’ll also learn how to pass in those values by using a