From 957aed6e23624113b4d0ff6d9f277f25fca90b38 Mon Sep 17 00:00:00 2001 From: in-in Date: Sun, 10 Sep 2023 23:46:43 +0300 Subject: [PATCH] add missing highlight (#4598) --- docs/tutorials/essentials/part-6-performance-normalization.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorials/essentials/part-6-performance-normalization.md b/docs/tutorials/essentials/part-6-performance-normalization.md index 852f6e77e8..4f04eead1d 100644 --- a/docs/tutorials/essentials/part-6-performance-normalization.md +++ b/docs/tutorials/essentials/part-6-performance-normalization.md @@ -385,6 +385,7 @@ export default notificationsSlice.reducer We want to mark these notifications as read whenever our `` component renders, either because we clicked on the tab to view the notifications, or because we already have it open and we just received some additional notifications. We can do this by dispatching `allNotificationsRead` any time this component re-renders. In order to avoid flashing of old data as this updates, we'll dispatch the action in a `useLayoutEffect` hook. We also want to add an additional classname to any notification list entries in the page, to highlight them: ```jsx title="features/notifications/NotificationsList.js" +// highlight-next-line import React, { useLayoutEffect } from 'react' // highlight-next-line import { useSelector, useDispatch } from 'react-redux'