react18-tools/persist-and-sync

Throw Error when store name is changed.

Open

#11 opened on Dec 30, 2023

 (0 comments) (0 reactions) (0 assignees)TypeScript (9 forks)auto 404
good first issue

Repository metrics

Stars
 (48 stars)
PR merge metrics
 (PR metrics pending)

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