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

View context mutations #286

Open
Southclaws opened this issue Nov 10, 2024 · 0 comments
Open

View context mutations #286

Southclaws opened this issue Nov 10, 2024 · 0 comments

Comments

@Southclaws
Copy link
Owner

Pretty much all mutation hooks are written for a single specific view, some of which do multiple mutations to catch a couple of different scenarios that a resource can exist in (thread vs feed for example - it mutates the list and also mutates the thread itself)

This worked so far, but resources will show up in all sorts of places soon (boards, feeds, library, searches, LLM responses, threads, etc) so mutators need to be a bit more clever and know the context from which the mutation is occurring.

For this, I'm thinking a "view context" parameter for mutation hooks so they can optimistically mutate the correct place. It might also solve part of #278 this can also make mutators more composable and pull them out of the actual hook functions (they can get quite large)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant