margelo / margelo/react-native-mmkv

Path config with `~` on macOS seems to not work

Open
#347 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.5k
Forks
341
Avg merge
8h 11m
Merged PRs (30d)
4

Description

Lately, I have switched from AsyncStorage to MMKV in on of the macOS test projects, and I would like to utilize the path config, but it looks like that, when path includes tilde (~) file is not saved. Not sure if this is intended to work, but I have decided to report this anyway, so feel free to close this one or convert to feature request.

Other thing which was a bit unexpected is that you cannot use the constructor with config object, but without the id field (no fallback to default?), so for example when path and encryption field are the only present, this leads to error about missing ID.

Repro

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 with the reproduction's src/Storage.js and confirm the behavior using the path '~/.test' on macOS. Then trace the path configuration and constructor validation in the relevant MMKV entry points. Done means the reported path behavior and the config without an id have clearly defined, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
databases, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.