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的更多相关文章

  1. Cesium原理篇:Material

    Shader 首先,在本文开始前,我们先普及一下材质的概念,这里推荐材质,普及材质的内容都是截取自该网站,我觉得他写的已经够好了.在开始普及概念前,推荐一首我此刻想到的歌<光---陈粒>. ...

  2. Cesium原理篇:Material【转】

    https://www.cnblogs.com/fuckgiser/p/6171245.html Shader 首先,在本文开始前,我们先普及一下材质的概念,这里推荐材质,普及材质的内容都是截取自该网 ...

  3. 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 ...

  4. 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 ...

  5. PTA Strongly Connected Components

    Write a program to find the strongly connected components in a digraph. Format of functions: void St ...

  6. ExtJS笔记5 Components

    参考 :http://blog.csdn.net/zhangxin09/article/details/6914882 An Ext JS application's UI is made up of ...

  7. 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 ...

  8. [Angular 2] Angular 2 Smart Components vs Presentation Components

    Both Smart Components and Presentation Components receive data from Services in entirely different w ...

  9. Spring Filter components in auto scanning

    In this Spring auto component scanning tutorial, you learn about how to make Spring auto scan your c ...

随机推荐

  1. vim basic

    1.基本用法 1.1.编辑模式 1.2.底行模式 1.3.环境配置 1.4.使用时发现的 2.编辑多个文档 3.选项 1.基本用法 1.1.编辑模式 插入 插入命令 插入位置 i 光标左侧 a 光标右 ...

  2. ROS Industrial 简介

    ROS_I means ROS Industrial ROS_I 解决了哪些问题: 1. 让自动化可以互相协作,操纵器.末端执行器.感知系统/传感器,移动平台,周边设备,都可只用一种语言(ROS me ...

  3. remote staging type or host is not specified

    idea在tomcat配置中显示此错误 配置下面选上就好了

  4. Java,Hello World,《算法》环境搭建中的问题,用 cmd 和 IntelliJ Idea 分别编译和运行 Java 程序

    ▶ IntelliJ idea 下载和安装(http://www.jetbrains.com/idea/) ▶ 新建项目(如图),注意选择 SDK 类型和位置 ● 在 src 目录中新建一个 Pack ...

  5. yii主题

    修改应用的配置文件(protected/config/main.php)中加入 return array( ’theme’=>’basic’, ); 所有的视图文件必须位于views下 ,布局视 ...

  6. zookeeper超时:Unable to connect to zookeeper server within timeout: 5000

    解决措施: 1:检查 提供方和消费方的address是否正确 <dubbo:application name="dubboxdemo-servive"/> <du ...

  7. IP与十进制相互转化

    def ip2Long(ip: String): Long = { val fragments = ip.split("[.]")  var ipNum = 0L  for (i ...

  8. 2018年1月21日--2月4日 NAS

    二十号去比赛时,与同事闲聊时说起家庭服务器,后来搜到nas(网络附着存储器),找到freenas,突然觉得很有用,手机拍了大量的照片视频,存储在电脑,已经换过几次硬盘了,对于这些珍贵的资料,万一硬盘坏 ...

  9. UEditor 在ie中报console未定义解决方案

    解决办法:                  1.注释掉该代码               2.或者加入如下代码即可,本人已经测试过,没有问题. window.console = window.con ...

  10. Python基础5 常用模块学习

    本节大纲: 模块介绍 time &datetime模块 random os sys shutil json & picle shelve xml处理 yaml处理 configpars ...