Skip to content

Commit 957aed6

Browse files
authored
add missing highlight (#4598)
1 parent 1c087cb commit 957aed6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/tutorials/essentials/part-6-performance-normalization.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ export default notificationsSlice.reducer
385385
We want to mark these notifications as read whenever our `<NotificationsList>` 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:
386386

387387
```jsx title="features/notifications/NotificationsList.js"
388+
// highlight-next-line
388389
import React, { useLayoutEffect } from 'react'
389390
// highlight-next-line
390391
import { useSelector, useDispatch } from 'react-redux'

0 commit comments

Comments
 (0)