User-Defined Components Must Be Capitalized
【User-Defined Components Must Be Capitalized】
When an element type starts with a lowercase letter, it refers to a built-in component like<div> or <span> and results in a string 'div' or 'span' passed to React.createElement. Types that start with a capital letter like <Foo /> compile to React.createElement(Foo) and correspond to a component defined or imported in your JavaScript file.
We recommend naming components with a capital letter. If you do have a component that starts with a lowercase letter, assign it to a capitalized variable before using it in JSX.
For example, this code will not run as expected:

To fix this, we will rename hello to Hello and use <Hello /> when referring to it:

参考:https://facebook.github.io/react/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized
User-Defined Components Must Be Capitalized的更多相关文章
- Cesium原理篇:Material
Shader 首先,在本文开始前,我们先普及一下材质的概念,这里推荐材质,普及材质的内容都是截取自该网站,我觉得他写的已经够好了.在开始普及概念前,推荐一首我此刻想到的歌<光---陈粒>. ...
- Cesium原理篇:Material【转】
https://www.cnblogs.com/fuckgiser/p/6171245.html Shader 首先,在本文开始前,我们先普及一下材质的概念,这里推荐材质,普及材质的内容都是截取自该网 ...
- Property or method "openPageOffice" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by
Property or method "openPageOffice" is not defined on the instance but referenced during r ...
- Property or method "previewUrl" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components,
Property or method "previewUrl" is not defined on the instance but referenced during rende ...
- PTA Strongly Connected Components
Write a program to find the strongly connected components in a digraph. Format of functions: void St ...
- ExtJS笔记5 Components
参考 :http://blog.csdn.net/zhangxin09/article/details/6914882 An Ext JS application's UI is made up of ...
- RFIDler - An open source Software Defined RFID Reader/Writer/Emulator
https://www.kickstarter.com/projects/1708444109/rfidler-a-software-defined-rfid-reader-writer-emul h ...
- [Angular 2] Angular 2 Smart Components vs Presentation Components
Both Smart Components and Presentation Components receive data from Services in entirely different w ...
- Spring Filter components in auto scanning
In this Spring auto component scanning tutorial, you learn about how to make Spring auto scan your c ...
随机推荐
- 43.scrapy爬取链家网站二手房信息-1
首先分析:目的:采集链家网站二手房数据1.先分析一下二手房主界面信息,显示情况如下: url = https://gz.lianjia.com/ershoufang/pg1/显示总数据量为27589套 ...
- 【Social Listening实战】当数据分析遭遇心理动力学:用户深层次的情感需求浮出水面
本文转自知乎 作者:苏格兰折耳喵 ----------------------------------------------------- 本文篇幅较长,分为五部分,在中间部分有关于心理分析工具的介 ...
- Http协议基础知识
r equest POST https://re.csdn.net/csdnbi HTTP/1.1方法 url/uri 协议的版本号 1.1Host: re.csdn.netConnection: k ...
- 键值对操作 之 combineByKey
combineByKey( createCombiner,mergeValue,mergeCombiners,partitioner) combineByKey() 是最为常用的基于键进行聚合的函数. ...
- python大法好——修改文件、函数
1.修改文件 补充上次没洗完的: 想要修改某个文件里一块地方,可以使用seek函数找到位置write函数修改. 是不是觉得这很简单? 但是如果你这样操作很可能会出现乱码. 因为由于字节数的不同,编码的 ...
- python大法好——编码.文件
1.编码 python3 中使用utf-8作为默认编码. UTF-8对Unicode进行转化,为解决存储和网络传输问题. UTF是为Unicode编码设计的一种在存储和传输节省空间的编码方案. Uni ...
- web service 部 分
1 .WEB SERVICE 名 词 解 释 .JSWDL 开 发 包 的 介 绍 .JAXP .JAXM 的 解 释 . SOAP .UDDI,WSDL 解 释 . Web ServiceWeb S ...
- Notification html5 的通知api
https://developer.mozilla.org/zh-CN/docs/Web/API/notification 使用方法 var notification = new Notificati ...
- VC中链接错误,提示string重定义
VC链接错误,说是string已经有了实现了,只要 rebuild 一下好了. Linking...LINK : warning LNK4075: ignoring '/EDITANDCONTINUE ...
- 微信小程序request请求封装
var app = getApp(); function request(url,postData,doSuccess,doFail,doComplete){ var host = getApp(). ...