[IMPORTANT] Circulaire afhankelijkheid: syncService importeert van SettingsScreen #4
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eddy/weegschaal-app#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
src/sync/syncService.ts:60,69gebruikt dynamische imports omgetApiConfig()op te halen:Een sync service zou niet afhankelijk moeten zijn van een UI screen component. Dit is een architectuurprobleem:
getApiConfig,saveConfig,deleteConfigzijn pure config-persistentie — geen UI-logicaOplossing
src/config/apiConfig.tsgetApiConfig(),saveConfig(),deleteConfig()ernaartoesyncService.ts:import { getApiConfig } from '../config/apiConfig'SettingsScreen.tsx:import { getApiConfig, saveConfig, deleteConfig } from '../config/apiConfig'Dit elimineert de
await import()overhead en maakt de dependency graph correct.