Choosing the Type at Runtime

  You cannot use a general expression as the React element type. If you do want to use a general expression to indicate the type of the element, just assign it to a capitalized variable first. This often comes up when you want to render a different component based on a prop:

  

  To fix this, we will assign the type to a capitalized variable first:

  

参考:https://facebook.github.io/react/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized

Choosing the Type at Runtime的更多相关文章

  1. Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'

    [TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from as ...

  2. Resource Path Location Type Target runtime Apache Tomcat v6.0 is not defined(项目报错)已解决

    我换了开发工具后,导入的项目不是这里报错就是那里不错.不过,我喜欢.在tomcat里面部署项目后,定位到报错行时,总是提示我这句话:Description Resource Path Location ...

  3. "Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b7

    1.错误背景 系统安装了.net framework4.0.4.5,项目先使用VS2013(4.5)开发,后来又重新用VS2010开发(4.0),运行时出现这个错误 2.错误原因 In .Net 4. ...

  4. Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib 的一种情形

    没有引用任何.net 4.5的东西,也没有引用 Newtonsoft.dll,原因是引用了微软的tlb类型库,引用方法如 https://www.cnblogs.com/nanfei/p/108798 ...

  5. JavaScript 和 React,React用了大量语法糖,让JS编写更方便。

    https://reactjs.org/docs/higher-order-components.htmlhttps://codepen.io/gaearon/pen/WooRWa?editors=0 ...

  6. props & children

    一. choosing the type at runtime import React from 'react'; import { PhotoStory, VideoStory } from '. ...

  7. Run-time type information--RTTI

    In computer programming, run-time type information or run-time type identification (RTTI)[1] refers ...

  8. linux驱动程序之电源管理之Run-time PM 详解(4)

    Run-time PM. 每个device或者bus都会向run-time PM core注册3个callback   struct dev_pm_ops { ... int (*runtime_su ...

  9. Target runtime Apache Tomcat v6.0 is not defined. phyy Unknown Faceted Project Problem

    Description Resource Path Location TypeTarget runtime Apache Tomcat v6.0 is not defined. phyy Unknow ...

随机推荐

  1. My sql 自增 虚拟列。

    在MYSQL 是没有类似MSSQL 2008 / oracle 数据库开窗函数 over() ,rank(), DENSE_RANK() ,ROW_NUMBER() 又叫窗口函数 . 当我们需要在查询 ...

  2. Mybatis六(SSM框架)

    SSM三大框架整合详细教程(SPRING+SPRINGMVC+MYBATIS) 使用 SSM ( Spring . SpringMVC 和 Mybatis )已经有三个多月了,项目在技术上已经没有什么 ...

  3. Mapper的.xml文件的delete的参数问题

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-// ...

  4. C语言中的__LINE__宏

    在C语言中,有这么四个预定义的宏: 当前文件: __FILE__ 当前行号: __LINE__ 当前日期: __DATE__ 当前时间: __TIME__ 这4个宏在代码编译的时候,由编译器替换成实际 ...

  5. element UI select 设定默认值

    要为select设定默认值,有两个步骤 1.数据中,声明一个变量param:该变量的值设为你想设定的select option中value 2.控件的 v-model 绑定 param 即可 < ...

  6. delphi ios info.plist

    delphi ios info.plist delphi修改info.plist.TemplateiOS.xml文件,然后自动生成project1.info.plist http://docwiki. ...

  7. 解决idea启动项目报错:Unable to open debugger port(127.0.0.1:60157):java.net.SocketException"socket closed

    原因分析: 1.可能是端口被占用导致,其他软件占用了tomcat的端口. 2.可能是在打开Tomcat的情况下关闭了Eclipse.idea等开发工具,或是Eclipse.idea非正常关闭(如电脑. ...

  8. Java快速开发平台,JEECG 3.7.6性能增强版本发布

    JEECG 3.7.6 性能增强版本发布 导读       ⊙Vue SPA单页面应用 ⊙Datagrid标签实现不同风格切换,支持BootstrapTable.EasyUI ⊙灵活通用代码生成器工厂 ...

  9. 2018SDIBT_国庆个人第二场

    A.codeforces1038A You are given a string ss of length nn, which consists only of the first kk letter ...

  10. Oracle数据库中的数据出错的解决办法

    http://www.jcwcn.com/article/database/oracle/ 今天上班犯了一个严重的错误:把我们系统所使用的Oracle数据库中的数据给改掉了!当发现自己改错时,顿时冒了 ...