react18-tools / react18-tools/persist-and-sync

Throw Error when store name is changed.

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
TypeScript
Stars
48
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
The name of the persistent store can not be changed, as it is used before the state is loaded.

Describe the solution you'd like

  1. Create an interface for __persistNSyncOptions. This interface should not include name.
  2. Throw an error when name is changed.
  3. Always read option.name and not prevState.__persistNSyncOptions.name

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

No contributing guide indexed for this repository

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

The issue names no file or test; locate the __persistNSyncOptions definition and the code that reads option.name or prevState.__persistNSyncOptions.name. Implement the requested interface and changed-name error, then verify that the option name is always read from option.name and that the error occurs when it changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.