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
4 changed files with 12 additions and 21 deletions
+1 -6
View File
@@ -13,7 +13,6 @@ import {PostsFeedSliceModel} from './posts-slice'
import {track} from 'lib/analytics/analytics'
const PAGE_SIZE = 30
let _idCounter = 0
type QueryParams =
| GetTimeline.QueryParams
@@ -368,11 +367,7 @@ export class PostsFeedModel {
const toAppend: PostsFeedSliceModel[] = []
for (const slice of slices) {
const sliceModel = new PostsFeedSliceModel(
this.rootStore,
`item-${_idCounter++}`,
slice,
)
const sliceModel = new PostsFeedSliceModel(this.rootStore, slice)
toAppend.push(sliceModel)
}
runInAction(() => {