solidjs-community / solidjs-community/solid-primitives

`captureStoreUpdates` — return the full `path` to the property that changed

Open
#576 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
TypeScript
Stars
1.6k
Forks
162
Avg merge
19h 40m
Merged PRs (30d)
8

Description

Describe The Problem To Be Solved

I'm migrating from on-change to using captureStoreUpdates().

When using captureStoreUpdates(), setting a new value mutable.settings.model = model will produce the path: ["settings"]. However, if I replace the entire settings object this will trigger more updates than just updating the settings.model property.

Suggest A Solution

I propose for an option or change in behavior where setting mutable.settings.model produces path: ["settings", "model"].

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the captureStoreUpdates() implementation and its existing tests, then trace how nested property assignments are recorded compared with whole-object replacement. Determine how the requested full path should behave in both cases, add coverage for mutable.settings.model, and consider whether the change is an option or the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.