Repository navigation
refactor: repositorios y acceso a datos - #241
Conversation
… refactor/save-board
…rage y server action
…za los docs al módulo genérico
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
React Doctor found 2 new issues in 1 file · 2 warnings · score 90 / 100 (Great) · 0 fixed · vs 2 warnings
Reviewed by React Doctor for commit |
| // Mismo orden que emite diffTaskBoard: columnas → deletes de tareas → tareas → deletes de columnas. | ||
| for (const { id, name, order } of upsertColumns) { | ||
| if (isPlaceholder(id)) { | ||
| const realId = await resolveColumnId(id, name) |
There was a problem hiding this comment.
React Doctor · react-doctor/async-await-in-loop (warning)
This makes the for…of loop slow because each await runs one after another, so collect the independent calls & run them together with await Promise.all(items.map(...))
Fix → Collect the items, then use await Promise.all(items.map(...)) so independent work runs at the same time
| for (const { task, columnId, order } of upsertTasks) { | ||
| const data = { | ||
| descriptionText: task.descriptionText, | ||
| columnId: await resolveColumnId(columnId), |
There was a problem hiding this comment.
React Doctor · react-doctor/async-await-in-loop (warning)
This makes the for…of loop slow because each await runs one after another, so collect the independent calls & run them together with await Promise.all(items.map(...))
Fix → Collect the items, then use await Promise.all(items.map(...)) so independent work runs at the same time
Todo lo que una feature guarda por tablero (tareas, archivo, limbo, notas, notas archivadas, recordatorios, pizarra) se lee y se escribe a través de un repositorio de
web-app/src/shared/repository/. El módulo reparte el trabajo en tres piezas.Repository<T>y sus subclases), que no sabe dónde terminan los datos.LocalStorageDataSourcepara invitados,ServerActionDataSourcecon sesión), que no sabe nada del dominio.bySession, en la fábrica de cada feature, una sola vez por llamada.