<div>
      <button style={{width: "100%"}} className="pt-button pt-intent-primary" onClick="{() => { this.authWithFacebook() }}">Log In with Facebook</button>
      <hr style={{marginTop: "10px", marginBottom: "10px"}}>
      <form onSubmit={(event) => { this.authWithEmailPassword(event) }} ref={(form) => { this.loginForm = form }}>
        <div style={{marginBottom: "10px"}} className="pt-callout pt-icon-info-sign">
          <h5>Note</h5>
          If you dont have an account already, this will create you one!
        </div>
        <label className="pt-label">
          Email
          <input style={{width: "100%"}} className="pt-input" name="email" type="email" ref={(input) => {this.emailInput = input}} placeholder="Email"></input>
          Password
          <input style={{width: "100%"}} className="pt-input" name="password" type="password" ref={(input) => {this.passwordInput = input}} placeholder="Password"></input>
        </label>
         <input style={{width: "100%"}} type="submit" className="pt-button pt-intent-primary" value="Log In"></input>
        </form>
    </div>


错误信息:

Syntax error: D:/xxxx/xxxx/xxxx/webWorker/webworker/src/components/Login.js: Unterminated JSX contents (39:14)


我不知道这是什么问题,看来还可以,但是我无法运行它。谢谢你的帮忙。

最佳答案

尝试关闭<hr />标签,您也可以关闭输入标签<input />,因为它们也没有内容。

关于javascript - 未终止的JSX内容- react ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48850233/

10-13 09:01
查看更多