datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
273 stars 233 forks source link

I dont't use redux,but it can't createAccont #48

Closed ftb2010 closed 6 years ago

ftb2010 commented 6 years ago

let endpoint = new Endpoint(); let state = await endpoint.start(); let account = await endpoint.createAccont(configuration); use this code can't createAccont; no result returned; Could you please update your example using react-navigation and dva?

datso commented 6 years ago

There is no specific code that are related to redux in that library. Could you provide some logs what actually doesn't work?

ftb2010 commented 6 years ago

@datso This is my dva demo,only use index.android.js to test createAccount,await can't be done.Could you please help me to solve it? react-native-dva-starter-master.zip

datso commented 6 years ago

Please provide the logs that shows the flow and issue. It would be also great if you don't use async for componentWillMount...

componentWillMount() { const endpoint = new Endpoint(); endpoint.start().then((state) => { endpoint.createAccount(...configuration).then((account) => { console.log("Your account", account) }) ) }