Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of useDraftObservation() hook #860

Open
gmaclennan opened this issue Nov 25, 2024 · 0 comments
Open

Cleanup of useDraftObservation() hook #860

gmaclennan opened this issue Nov 25, 2024 · 0 comments

Comments

@gmaclennan
Copy link
Member

Managing draft observations is a critical part of the app, and a part that is really important to get right. Currently the logic for managing a draft observation is split between two hooks useDraftObservation and usePersistedDraftObservation. Some properties from one hook are the same as the other, and some are different. We also return a hook from a hook, which is confusing.

Cleaning up and simplifying this code should make it easier to maintain this part of the app and to write unit tests for the important logic around updating presets and saving photos and audio.

@gmaclennan gmaclennan converted this from a draft issue Nov 25, 2024
@achou11 achou11 moved this from Backlog to In Progress in CoMapeo Refactor Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant