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

Update Website Docs (not API docs) with removeListener example

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      Mobile APIs have the handlers return a token
      This token can be removed in the removeListener

      You have to go to the JS API docs to really figure out how this is done. The real way to do is to have a reference to the callback handler. It would important to show how {{removeListener}}works on the main website.

      const callback = function(changes){ 
      
      }
      realm.addListener('change', callback)
      
      // later
      remove.removeListener(callback) 
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: