title: Where to store Class instance for reusability in Redux?
body: <p>I am trying to implement a messaging library Chatkit by Pusher in my React/Redux/redux saga app and I'm new to Redux. The code for connecting to chatkit looks like this:</p>
  
  <pre><code>const chatManager = new ChatManager({
      instanceLocator: 'v1:us1:80215247-1df3-4956-8ba8-9744ffd12161',
      userId: 'sarah',
      tokenProvider: new TokenProvider({ url: 'your.auth.url' })
  })
  
  chatManager.connect()
      .then(currentUser =&gt; {
          console.log('Successful connection', currentUser)
      })
      .catch(err =&gt; {
          console.log('Error on connection', err)
      })
  </code></pre>
  
  <p>I need to store the chatManager and currentUser objects, (which are instances of complex classes with functions atttached) globally so that I can use them again later to join rooms, subscribe to events etc.</p>
  
  <p>My first thought was that I should store it in Redux as that's now my "global store" but I then realised that it probably won't work as it won't be the original object I get back out of the store, it'll presumably a clone. I then read that apparently only plain objects are supposed to be stored in Redux.</p>
  
  <p>So, where are things that aren't plain objects but do need to be stored globally? I don't want to put them on the window object as I may convert this to a React Native app and it seems messy anyway.</p>