Perf: switch to stable react keys (#1113)

This commit is contained in:
Paul Frazee 2023-08-05 11:29:55 -07:00 committed by GitHub
parent d53cbb91bb
commit 89fc975a15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 21 deletions

View file

@ -23,8 +23,6 @@ const PAGE_SIZE = 30
const MS_1HR = 1e3 * 60 * 60
const MS_2DAY = MS_1HR * 48
let _idCounter = 0
export const MAX_VISIBLE_NOTIFS = 30
export interface GroupedNotification extends ListNotifications.Notification {
@ -573,7 +571,7 @@ export class NotificationsFeedModel {
for (const item of items) {
const itemModel = new NotificationsFeedItemModel(
this.rootStore,
`item-${_idCounter++}`,
`notification-${item.uri}`,
item,
)
const uri = itemModel.additionalDataUri