zendesk / cross-storage

Cross domain local storage, with permissions
Apache License 2.0
2.22k stars 180 forks source link

TypeError: this._installListener is not a function #53

Closed TeodorKolev closed 6 years ago

TeodorKolev commented 6 years ago

Using ReactJs I have next issue: TypeError: this._installListener is not a function error in client.js:52

const crossStorageClient = require('cross-storage').CrossStorageClient;
const myUrl = 'http://localhost:3456/hub.html';
...
 componentDidMount() {
    const storage = crossStorageClient(myUrl);
    storage.onConnect()
      .then(() => storage.get('cool_prop'))
      .then((res) => {
        console.log(res);
      })
      .catch(err => console.log(err));
  }
...