Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

unnecessary rerenders of every row and cell in examples/react/editable-data

Aperta
#4,794 20 commenti 20 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript

Direzione di ricerca

Inizia in examples/react/editable-data e riproduci il flusso di modifica con il React DevTools profiler. Traccia il riferimento instabile cell.getContext() e determina se il comportamento dell'esempio o della tabella fa sì che tutte le righe e le celle vengano nuovamente renderizzate. Il lavoro è completato quando la modifica di una cella non causa più il nuovo rendering delle celle non correlate e il risultato del profiling è stato verificato nell'esempio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

Every time one cell is edited in the examples/react/editable-data example, the entire table rerenders. If a user wants to render a large amount of rows, this strategy will start getting slow. At 50 rows in the example it takes 14.4 milliseconds to rerender the whole table with basic data. I've narrowed the unstable reference down to cell.getContext().

Your minimal, reproducible example

https://github.com/TanStack/table/tree/main/examples/react/editable-data

Steps to reproduce
  1. Open react dev tools profiler
  2. Start profiling
  3. Click on a cell to edit it
  4. Click off the cell
  5. Stop the profiler
  6. Check the results
Expected behavior

Only the affected cell should rerender unless my other cells have a direct dependency on it. I've even tried creating memoized components all the way down to the cell.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Windows

react-table version

8.8.5

TypeScript version

No response

Additional context

If this is something the library doesn't support then I think there should be a documentation section on it describing the pitfalls of rendering a large amount of rows and/or using complex cells.

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Lingua principale
TypeScript
Stelle
28.5k
Fork
3.6k
Merge medio
19h 40m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/table

Tutte le issue di TanStack/table

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.