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 ...
随机推荐
- 20165205 2017-2018-2 《Java程序设计》第六周学习总结
20165205 2017-2018-2 <Java程序设计>第六周学习总结 教材学习内容总结 String类 String对象(常量,对象) 字符串并置(结果仍是常量) 常用方法 len ...
- django之register_model(self, app_label, model):
前面在阅读apps_install源码时,一直不明白app的model是什么时候导入的,今天在看modelbase源码时,看到了new_class._prepare() new_class._meta ...
- Python linux 上的管理工具 pyenv 安装, pip 使用, python项目(版本分割, 项目分割, 虚拟环境创建)
01: 假设你有一个最小环境安装的 centos-6.x 的linux操作系统 02: 安装 git => yum -y install git 03: 安装依赖 => yum -y in ...
- centos7.5单机yum安装kubernetes
1.系统配置 centos7.5 docker 1.13.1 centos7下安装docker 2.关闭防火墙,selinux,swapoff systemctl disable firewalld ...
- 02.photoshop制作透明图片步骤
1.首先打开PS软件和图片如下.文件-新建. 2.如下图背景内容选择-透明.在确定. 3.出现了白底这就是透明的. 4.将图片背景都去除 5.在选择文件-存储为 6.格式选择.GIF的文件.其它不是透 ...
- leetcode1022
class Solution(object): def __init__(self): self.li = list() self.sums = 0 def Trace(self,root): if ...
- const 关键字总结
int a; const int* p = &a; == int const * p = &a; 表示通过p不能修改a的值. const int a; int *p = &a ...
- DJango之视图函数
一)Django WEB框架 2) request.path和request.get_full_path() 是请求的路径 3)render:页面渲染 4)redirect:页面跳转 3)模板语法: ...
- Mongodb集群节点故障恢复场景分析(转)
一个适当配置的Mongodb分片集群是没有单点故障.本文描述了分片集群中存在的几种不同的潜在的节点故障场景,以及Mongodb对这些节点故障是怎么处理的.1.Mongos节点宕机一个Mongos进程应 ...
- 尚硅谷springboot学习19-日志切换
查看相关依赖关系,排除相关依赖,引入新的日志依赖 slf4j+log4j的方式: <dependency> <groupId>org.springframework.boot& ...