Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-444

Component doesn't rerender if realm object used as state.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Goals

      I use setState hook with realm object and expect that Component will re-render after realm object modified

      Expected Results

      Component should re-render

      Actual Results

      Component re-render in DEBUG mode, but it doesn't in RELEASE mode

      Steps to Reproduce

      1. Create Realm Object with property
      2. Use this object as state for functional component
      3. Modify This object and update state
      4. Component should re-render, but it doesn't (in RELEASE mode)

      I have created Test Environment where you can easily reproduce it: https://github.com/TuTejsy/Test-Environment

      Demo in DEBUG mode: https://youtu.be/LZxPk5P5TK4
      Demo in RELEASE mode: https://youtu.be/HX617LHOO3Y

      Code Sample

      I have created Test Environment where you can easily reproduce it: https://github.com/TuTejsy/Test-Environment

      Version of Realm and Tooling

      • Realm JS SDK Version: "3.6.4"
      • Node or React Native: React Native
      • Client OS & Version: IOS 13
      • Which debugger for React Native: Chrome Dev Tools

            Assignee:
            kraen.hansen@mongodb.com Kræn Hansen
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: