注意:For DOM differences,such as the inline style attribute,check here.

// bad: it displays "FIrst · second" 
<div>{'First &middot; Second'}</div>

  There are various ways to work-around this issue.The easiest one is to write unicode cahracter directly in JavaScript.You need to make sure the file is saved as UTF-8 and that the proper UTF-8 directive are set so the brower will display it correctly.

<div>{'First \u00b7 Second'}</div>
<div>{'First' + String.fromCharCode(183) + 'Second'}</div>

  

<div>{['First',<span>·</span>,'Second']}</div>

  

<div dangerouslySetInnerHTML = {{__html:'First · Second'}}>

 

  if you pass properties to native HTML elements that do not exist in the HTML specification,React will not render them. if you want to use a custom attribute,you should prefix it with data-

<div data-custom-attribute = "foo">

  web Accessibility attributes starting with aria- will be rendered properly.

<div aria-hidden = {true}>

  

React(JSX语法)----JSX拼写的更多相关文章

  1. React(JSX语法)-----JSX基本语法

    JSX------HTML tags vs React Components: 1.To render a html tag,just use lower-case tag names in JSX; ...

  2. React(JSX语法)-----JSX属性

    1. if you know all the propertities that you want to place on a component ahead of time,it is easy t ...

  3. 22-React JSX语法

    React JSX语法 JSX只是一个语法糖,每一个XML标签都会被JSX转换工具转换成纯Javascript代码,当然你想直接使用纯Javascript代码写也是可以的,只是利用JSX,组件的结构和 ...

  4. 2.ReactJS基础(虚拟DOM,JSX语法)

    将脚手架(create-react-app)创建的todolist项目精简为hello world示例 即,删除自动生成的样式文件.logo.svt.App.test.js.serviceWorker ...

  5. 1.2 JSX 语法

    官方文档 https://facebook.github.io/react/docs/jsx-in-depth.html JSX 语法听上去很讨厌,但当真正使用的时候会发现,JSX 的写法在组件的组合 ...

  6. React JSX语法说明

    原文:http://my.oschina.net/leogao0816/blog/379487 什么是JSX? 在用React写组件的时候,通常会用到JSX语法,粗看上去,像是在Javascript代 ...

  7. Webstorm 不识别es6 import React from ‘react’——webstorm不支持jsx语法怎么办

    2016-10-31更新 webstorm不支持es6语法怎么办? webstorm不支持jsx语法怎么办? 参考:webstorm不支持jsx语法怎么办 I spent ages trying to ...

  8. react.js 从零开始(三)JSX 语法及特点介绍

    什么是jsx? jsx = JavaScript + xml jsx 是一种 Ecmascript 的一种新标准. jsx 是一种 带有结构性的语法. jsx 的特点: 1.类xml语法易于理解. 2 ...

  9. 【JAVASCRIPT】React学习-JSX 语法

    摘要 react 学习包括几个部分: 文本渲染 JSX 语法 组件化思想 数据流 JSX 语法 1. 定义 JSX 是javascript + xml 的合集,我们可以将javascript 与 ht ...

随机推荐

  1. 算法导论----贪心算法,删除k个数,使剩下的数字最小

    先贴问题: 1个n位正整数a,删去其中的k位,得到一个新的正整数b,设计一个贪心算法,对给定的a和k得到最小的b: 一.我的想法:先看例子:a=5476579228:去掉4位,则位数n=10,k=4, ...

  2. clistctrl失去焦点高亮显示选中行

    clistctrl失去焦点高亮显示选中行 响应两个消息 NM_SETFOCUS,NM_KILLFOCUS void CDatabaseParseDlg::OnNMKillfocusListGroup( ...

  3. iOS 为移动中的UIView(UIButton )添加点击事件

    高高兴兴迎接新的产品新需求,满心欢喜的开始工作,结果研究了一下午才发现,是自己想的太简单了,是我太单纯呀. 需求是这样的类似下雪的效果,随机产生一些小雪花,然后每个雪花可以点击到下个页面. 接到需求之 ...

  4. B2C电子商务基础系统架构解析(转载)

    系统的开发与演化,前台严格follow消费者的购买流程,后台则盯牢订单流转,牢牢抓住这两条主线,才能高屋建瓴的看清B2C的逻辑链和数据流,更深刻的规划功能模块,从而更有效支撑实际业务的流转. 前台 前 ...

  5. A Brief Review of Supervised Learning

    There are a number of algorithms that are typically used for system identification, adaptive control ...

  6. X3850M2安装CertOS 7 KVM 2--Mount

    x3850 m2设备接的存储是DS8000,检查发现系统下有两块disk是IBM2107900,一块容量为215GB,另一块是4GB.原因简单,4GB是以前高可用群集时用来做仲裁盘的. 奇怪的是,每块 ...

  7. Sort Characters By Frequency

    Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: ...

  8. 2016 - 2 - 19 ARC内存管理知识总结(一,arc基本概念及alloc等方法的实现)

    一. ARC的基本概念 1. 在objc中采用automatic reference counting 机制, 让编译器来进行内存管理.在降低程序崩溃,内存管理泄漏等风险的同时,很大程度减少了程序员的 ...

  9. 最大流模版 pascal

    //最大流模版 ; maxm=; ..maxn] of integer; end; var n,m,max:longint; r:..maxn,..maxn] of longint; g:..maxn ...

  10. SQlServer第一天

    SQLserver是个什么东西?相当于一是个货仓,在计算机领域的货仓,学名:数据库. 数据库是个什么东西呢?是指长期存储在计算机内的.有组织.可共享的数据结合.由此可知数据库的三个特点:永久存储.有组 ...