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. mysql之完整性约束

    主要内容 not null 与 default unique primary auto_increment foreign key 约束条件作用:用于保证数据的完整性和一致性 主要分为 PRIMARY ...

  2. .netLinq动态Where条件

    文章介绍全网最佳方式使用EF+Linq实现多条件组合查询:代码中没有使用到网上主流自定义Expression表达式而是采用linq原生态功能编写示例直观.易懂,且有效解决自定义Expression不支 ...

  3. uiautomator2.0的配置的两种方法

    方法一(使用在线下载的方式导入依赖): 1.首先创建项目工程,创建的项目的android_api版本要与测试的android_api版本一致(24就是24 ,不能26或者17去兼容) 2.然后就是将本 ...

  4. [Unity动画]05.Entry & Exit & Any State

    0.状态机如下: Any State->Dying:isDying为true Dying->Reviving:isDying为false Reviving->Exit:isDying ...

  5. oracle insert 返回ID

    create or replace procedure getid(v_id out number)as  v_sql varchar2(500); begin v_sql:='insert into ...

  6. 《算法》第四章部分程序 part 5

    ▶ 书中第四章部分程序,加上自己补充的代码,图的深度优先遍历 ● 无向图的广度优先遍历,有向 / 无向图代码仅若干方法名不同 package package01; import edu.princet ...

  7. CDH 安装遇到的问题

    CDH  遇到的问题 l JAVA_HOME问题 这里, 很明显可以看到, JAVA_HOME 并没有设置成功.using  as ... 感觉完全就是没有设置JAVA_HOME 这个环境变量.可是呢 ...

  8. web service 部 分

    1 .WEB SERVICE 名 词 解 释 .JSWDL 开 发 包 的 介 绍 .JAXP .JAXM 的 解 释 . SOAP .UDDI,WSDL 解 释 . Web ServiceWeb S ...

  9. 使用Quartz框架定时发送预警邮件

    1.  Quartz定时发送预警邮件 1.1.   需求及实现思路 定时查询库存预警信息,一旦存在库存预警的商品,则发邮件通知相关人员 1.2.   Quartz框架 Quartz是OpenSymph ...

  10. 线程池构造类 ThreadPoolExecutor 的 5 个参数

    1.corePoolSize :核心线程数 2.maxPoolSize: 最大线程数 3.keepAliveTime :闲置线程存活时间 4.unit:参数keepAliveTime的时间单位,有7种 ...