Typescript React React.createElement:类型不应该为null,undefined,boolean或number(Typescript React React.createElement: type should not be null, undefined, boolean, or number)
我正在使用TypeScript(1.8.10)并学习反应。 我正在使用React-Bootstrap来构建一个简单的导航作为示例,并且出现以下错误。 这个错误阻止了dom被渲染。 我是全新的反应,所以不知道我在这里做错了什么。 非常感谢您提供任何帮助或指针来解决此错误。
// A '.tsx' file enables JSX support in the TypeScript compiler, // for more information see the following page on the TypeScript wiki: // https://github.com/Microsoft/TypeScript/wiki/JSX /// <reference path="./../../../typings/index.d.ts" /> import * as React from 'react'; import * as ReactBootstrap from 'react-bootstrap'; interface INavigationProps { } let Navbar = ReactBootstrap.Navbar; let NavItem = ReactBootstrap.NavItem; let MenuItem = ReactBootstrap.MenuItem; let NavbarHeader = ReactBootstrap.NavbarHeader; const dropdownItems = [ { href: '#', name: 'Overview' }, { href: '#', name: 'Setup' }, { href: '#', name: 'Usage' }, ]; export default class Navigation extends React.Component<INavigationProps, {}> { render() { return ( <Navbar> <NavbarHeader href="homepage.html" name="Website Name"/> <NavItem> <MenuItem link="about.html" title="About" /> <MenuItem link="contact.html" title="Contact" /> <MenuItem link="services.html" title="Services" /> </NavItem> </Navbar> ); } } // A '.tsx' file enables JSX support in the TypeScript compiler, // for more information see the following page on the TypeScript wiki: // https://github.com/Microsoft/TypeScript/wiki/JSX /// <reference path="./../../typings/index.d.ts" /> import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactBootstrap from 'react-bootstrap'; import HeaderNavigation from "./NavigationComponent/navigation"; import Hello from "./HelloComponent/Hello"; ReactDOM.render( <div> <HeaderNavigation /> <Hello name="Athraya" /> </div>, document.getElementById("root") );
I am using TypeScript(1.8.10) and learning react. I am using React-Bootstrap to build a simple navigation as an example and I am getting the following error. THe error prevents the dom from getting rendered. I am totally new to react so not sure what I am doing wrong here. Thank you so much for any help or pointers to get past this error.
// A '.tsx' file enables JSX support in the TypeScript compiler, // for more information see the following page on the TypeScript wiki: // https://github.com/Microsoft/TypeScript/wiki/JSX /// <reference path="./../../../typings/index.d.ts" /> import * as React from 'react'; import * as ReactBootstrap from 'react-bootstrap'; interface INavigationProps { } let Navbar = ReactBootstrap.Navbar; let NavItem = ReactBootstrap.NavItem; let MenuItem = ReactBootstrap.MenuItem; let NavbarHeader = ReactBootstrap.NavbarHeader; const dropdownItems = [ { href: '#', name: 'Overview' }, { href: '#', name: 'Setup' }, { href: '#', name: 'Usage' }, ]; export default class Navigation extends React.Component<INavigationProps, {}> { render() { return ( <Navbar> <NavbarHeader href="homepage.html" name="Website Name"/> <NavItem> <MenuItem link="about.html" title="About" /> <MenuItem link="contact.html" title="Contact" /> <MenuItem link="services.html" title="Services" /> </NavItem> </Navbar> ); } } // A '.tsx' file enables JSX support in the TypeScript compiler, // for more information see the following page on the TypeScript wiki: // https://github.com/Microsoft/TypeScript/wiki/JSX /// <reference path="./../../typings/index.d.ts" /> import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactBootstrap from 'react-bootstrap'; import HeaderNavigation from "./NavigationComponent/navigation"; import Hello from "./HelloComponent/Hello"; ReactDOM.render( <div> <HeaderNavigation /> <Hello name="Athraya" /> </div>, document.getElementById("root") );
原文:https://stackoverflow.com/questions/39461794
最满意答案
I work at Twilio with the developer community.
It sounds like what you need here is Call Screening. There are also some examples there in C#.
Hope this helps.
相关问答
更多-
Twilio开发人员在这里传播信息。 我想你可能在队列中有一些过于复杂的东西。 您实际上可以提供该信息并收集原始呼叫,而无需自行拨出电话,最终连接两个呼叫。 就是这样: 你的来电TwiML应该是这样的:
ONWARD DIAL NUMBER -
[[编辑]] 唉唉! 我知道它是什么! 以下答案(我为子孙后代保留)是完全错误的。 当被拨打的人和耳语挂断时,将调用
动词上的action 。 从文档中, DialCallStatus值可以是 :已完成,忙碌,无应答,失败或已取消。 当该人拿起电话时,状态不能为忙,无应答,失败或取消。 因此,当他们在耳语结束之前挂断电话时,呼叫状态将会完成。 因此,当您的操作被调用时, DialCallStatus将完成,您的voicemail.php将挂断。 您还会收到一个DialCallDuration ,这 ... -
通过拨打号码来访问语音邮件,为此,您必须以编程方式执行所有步骤。 可能你想看看谷歌语音邮件,我心里有他们自己的服务,提供语音邮件服务。 http://support.google.com/voice/bin/answer.py?hl=en&answer=115073 voicemail is accessed by dialing a number, to do this you have to all steps programatically. May be you want to look at Go ...
-
不确定是否有其他问题,但有一个问题是:意图操作不是"android.intent.action.ACTION_NEW_VOICEMAIL"而是"android.intent.action.NEW_VOICEMAIL" 。 也许你把它与VoicemailContract类的常量名称混合起来,即VoicemailContract.ACTION_NEW_VOICEMAIL 。 Not sure that else is wrong, but one problem is: the intent action is ...
-
Twilio开发者传道者在这里。 我将通过向您的任务添加一个新的数组属性来记录拒绝该任务的工作人员的SID。 然后,当工作人员拒绝保留时,在该任务上添加该属性。 然后,您可以添加到目标表达式 : worker.sid NOT IN task.rejected_workers 一旦任务失败了该表达式,将其移动到具有一个空闲工作队而不是接受预留的新队列,只需将该呼叫重定向到某些TwiML以
语音邮件。 如果这有帮助,请告诉我。 编辑 事实证明,这并不是实现这一目标的正确方法,即使目标工作者表达式 ... -
Asterisk必须连接到具有N个扩展名的语音邮件(Asterisk must connect to voicemail with N number of extensions)[2023-05-01]
您可以使用数据库驱动的用户列表。 http://www.voip-info.org/wiki/view/Asterisk+voicemail+database 在数据库中,您可以使用视图和/或函数来创建虚拟用户列表。 You can use database-driven list of users. http://www.voip-info.org/wiki/view/Asterisk+voicemail+database In database you can use view and/or funct ... -
Twilio语音邮件(Twilio Voicemail)[2023-08-23]
我和开发者社区一起在Twilio工作。 这听起来像你需要的是电话筛选 。 C#中也有一些例子。 希望这可以帮助。 I work at Twilio with the developer community. It sounds like what you need here is Call Screening. There are also some examples there in C#. Hope this helps. -
使用API的语音邮件服务(Voicemail Service with API)[2022-03-31]
看看Tropo 。 它似乎有你描述的大部分功能,还有一些会让你感到沮丧 - 包括短信服务。 它也是免费的开发和廉价的生产。 我不为Tropo或附属公司工作,我只是听说过有关服务的好消息。 Take a look at Tropo. It seems to have much of the functionality you describe, and a few more which will tickle you pink - including SMS service. It's also free f ... -
根据[手册,您要查找的SEND_TO_VOICEMAIL字段不在ContactsContract.Data表中,而是在ContactsContract.Contacts表中。 看起来你正试图修改错误的表格。 有关每个表中的字段,请参阅ContactsContract.Data和ContactsContract.Contacts 。 According to the[manual, the SEND_TO_VOICEMAIL field you're looking for isn't in the Cont ...
-
在iPhone中访问语音邮件(Accessing voicemail in iPhone)[2022-06-29]
您可能无法直接从您的应用程序访问语音邮件,但有几个运营商提供直接电话号码,供人们直接拨入其语音邮件。 然后,您可以让人们在首选项中输入此语音邮件号码,并使用tel:1-408-555-5555访问它 有关此内容的更多信息,请参阅iOS参考库 You may not be able to directly access the voicemail from your app, but several operators provide a direct call number for people to di ...