Skip to content

Persist user preferences of React DevTools when debugging with Flipper #29839

Done

Description

@darrenvong

Description

When I am debugging my React Native app using the React DevTools in Flipper, I like to change the settings/preferences available, in particular the component filter to remove components I don't care about so I can locate the component I'm after more easily.

However, when the app is being reloaded, the values of the filter (amongst other preferences such as theme colours) aren't being persisted like they do when you use the same tool in the browser (say Chrome). This is a minor inconvenience as I'd like to not have to set the filters up again each time the app reloads.

Apparently this is a known problem due to the lack of a synchronous persistent storage API available on React Native from this conversation I started with @mweststrate @bvaughn @rickhanlonii on this Twitter thread, and I've been encouraged to raise this issue officially so it can be properly tracked and see if others are interested in this feature/solving it etc!

React Native version:

System:
    OS: macOS 10.15.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 33.91 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.20.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 27, 28, 29
      Build Tools: 28.0.3, 29.0.3
      System Images: android-22 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.7/11E801a - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Start the Metro bundler and the iOS/Android simulator following the standard Environment Setup instructions. Then:

  1. Open Flipper and go to React DevTools. Update the user preference by clicking the settings cog.
  2. Refresh the app

Expected Results

The user preference persists between app refreshes.

Activity

  1. rickhanlonii commented on Sep 3, 2020

    @rickhanlonii
    Contributor

    Thanks for filing this!

    As mentioned in the thread, the blocker to this is reading storage synchronously when the bundle loads. Once we can do that, adding this is pretty trivial.

  2. darrenvong commented on Sep 5, 2020

    @darrenvong
    Author

    Since you mentioned the introduction of the "new architecture" in React Native would be needed to add this, is there any rough timeline on when that would be ready?

  3. added
    DX
    and removed on Sep 6, 2020
  4. rickhanlonii commented on Sep 9, 2020

    @rickhanlonii
    Contributor

    There is not, it's being actively worked on right now.

  5. stale commented on Dec 25, 2020

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  6. added
    Stale
    on Dec 25, 2020
  7. darrenvong commented on Dec 29, 2020

    @darrenvong
    Author

    Should we add this to the "Backlog"? It'd be a nice feature to have, especially if once synchronous persistant storage is available, it'd be easy to implement for those who knows how this works :D

  8. removed
    Stale
    on Dec 29, 2020
  9. rickhanlonii commented on Jan 5, 2021

    @rickhanlonii
    Contributor

    We don't really have a backlog, but once sync persistent storage is available we'll add this.

  10. github-actions commented on Jul 8, 2023

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  11. added
    Stale
    on Jul 8, 2023
  12. swrobel commented on Jul 8, 2023

    @swrobel
    Contributor

    The new architecture is available now, so this should be possible, right?

  13. removed
    Stale
    on Jul 9, 2023
  14. hoxyq commented on Jul 13, 2023

    @hoxyq
    Collaborator

    Hey, we have plans to support this as a part of React DevTools improvements for react-native-community/discussions-and-proposals#641.

    I will follow up once we get more clarity on when this will be implemented and shipped.

  15. self-assigned this
    on Jul 13, 2023
  16. added
    Never gets stale
    on Jul 13, 2023
  17. cortinico commented on Nov 27, 2026

    @cortinico
    Contributor

    Closing as Flipper is no longer supported since RN 0.74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DXNever gets stale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions