Skip to content

Conversation

stevenconner
Copy link
Contributor

@stevenconner stevenconner commented Oct 10, 2025

What does this PR do?

  • Replaces MMKV-backed storage with a small C file-writing implementation for macOS.
  • Simplifies native dependencies and reduces build flakiness related to MMKV.
  • Persists timeline logs and preferences using the new file-based approach.
  • Includes migration and cleanup to remove MMKV usage.

What GitHub issues does this PR fix?

How to verify this code works?

reactotron-macos setup for this PR

  1. gh pr checkout 57
  2. npm install
  3. npm run pod
  4. npm run start
  5. npm run macos

Step by step of how to test this PR

  1. Launch reactotron-macos from this branch and start the example app.
  2. Ensure the app connects to the standalone server on port 9292 and logs appear.
  3. Trigger state changes and network requests; confirm timeline entries are recorded.
  4. Quit and relaunch reactotron-macos; verify prior timeline entries persist (new file storage).
  5. Confirm there are no references to MMKV in build logs or runtime.
  6. Check Console for absence of new warnings/errors related to storage.

Windows

This is not tested on windows...

@stevenconner stevenconner linked an issue Oct 10, 2025 that may be closed by this pull request
@joshuayoes
Copy link
Collaborator

joshuayoes commented Oct 10, 2025

request: remove react-native-mmkv from the package.json and update the lock files

"react-native-mmkv": "^3.3.0",

Copy link
Collaborator

@joshuayoes joshuayoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things seem to be looking pretty good. I tried quitting and reload and it seemed to retrieve some info from reloading. It didn't persist the logs but I'm not sure that is necessary.

Replace-MMKV-with-C-file.mov

I am noticing that even without the temp file, it seems to be persisting some client info when I quit and reload?

Screen.Recording.2025-10-10.at.3.08.32.PM.mov

id: "reactotron",
})
const PERSISTED_KEY = "global-state.json"
const STORAGE_DIR = "/tmp/reactotron/filestorage/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: on windows, this would be better put temp in C:\Users\Username\AppData\Local\Temp. But for now this is okay.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to utilize std::filesystem::path temp = std::filesystem::temp_directory_path(); That'll get the path Josh is talking about (and also should be good on macOS also)

https://en.cppreference.com/w/cpp/filesystem/temp_directory_path.html

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

Successfully merging this pull request may close these issues.

Replace mmkv with C++ file writing

3 participants