JSON解析错误:意外的标识符“尝试” React native和expo

时间:2019-11-19 07:02:14

标签: json react-native

JSON解析错误:意外的标识符“尝试” -tryCallOne中的node_modules \ promise \ setimmediate \ core.js:37:14 -node_modules \ promise \ setimmediate \ core.js:123:25在 -...还有8个来自框架内部的堆栈框架

fetch('http://devworldhouse.in/DevApp/user_registration.php', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({

    name: UserName,

    email: UserEmail,

    password: UserPassword

  })

}).then((response) => response.json())
      .then((responseJson) => {

// Showing response message coming from server after inserting records.
        Alert.alert(responseJson);

      }).catch((error) => {
        console.error(error);
      });


  }

  render() {
    return (

0 个答案:

没有答案