You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
TL;DRJSX is like a healthy vegetable that tastes like decadent chocolate cake. You feel guilty, but itâs good for you. (Tweet this). What is JSX?For those unfamiliar with React, JSX is an inline markup that looks like HTML and gets transformed to JavaScript. A JSX expression starts with an HTML-like open tag, and ends with the corresponding closing tag. JSX tags support the XML self close syntax s
Transcript 1. React.js ã« XSS 対çã æ±ããã®ã¯ééã£ã¦ãã ã ããã #edomaesec 2015 5/30 LT 2. @clariroid 3. ãããã© 4. React.js 5. React.js 6. React.js éãç´ 7. React.js ⢠UI ãæ§ç¯ãã JavaScript ã©ã¤ãã©ãª 8. React.js ⢠UI ãæ§ç¯ãã JavaScript ã©ã¤ãã©ãª ⢠Virtual DOM 9. React.js ⢠UI ãæ§ç¯ãã JavaScript ã©ã¤ãã©ãª ⢠Virtual DOM ⢠Component Composable 10. React.js ⢠UI ãæ§ç¯ãã JavaScript ã©ã¤ãã©ãª ⢠Virtual DOM ⢠Component Composable ⢠Server-side R
ãã¹ãé§åéçºï¼TDDï¼ã®ä¸è¬åã¨GitHubã®ç»å ´ã«ãã£ã¦ãæ©è½è¿½å ã®éã«ã³ã¼ãã¨ãã¹ããåæã«å®è£ ããï¼ããã¦ã両è ãä¸æ¬ãã¦masterã«mergeããï¼ã¨ããéçºææ³ãä¸è¬åãã¦ãã¾ããã ãããããè¯ãããã°ã©ã ãã®è¦ç´ ãæ§æããã®ã¯ãã³ã¼ãã¨ãã¹ãã®ã¿ã§ã¯ããã¾ãããåä½ããã³ã¼ãã¨ããã®å質ãæ ä¿ããããã®ãã¹ãããã£ãã¨ãã¦ããé©åãªããã¥ã¡ã³ãããªããã°ãã¦ã¼ã¶ã¼ã¯ãã®ããã°ã©ã ãã©ããã£ã¦ä½¿ã£ããè¯ãããããã¾ããã ã¤ã¾ããã¦ã¼ã¶ã¼ã«ä½¿ããããããã°ã©ã ãç¶ç¶çã«éçºï¼æä¾ãããã¨æãã¨ã ã³ã¼ã ãã¹ã ããã¥ã¡ã³ã ã®ï¼ç¹ã»ãããæä¾ããå¿ è¦ãããã®ã§ã注1ã ä»æ¥ã®JSXãæ±ãã¦ããæ大ã®èª²é¡ã¯ãããã¥ã¡ã³ããä¸è¶³ãã¦ããã¨ããç¹ã«ããã¾ãããã®åå ã¯ããæ©è½è¿½å ãã®éã«ã³ã¼ãã¨ãã¹ãã®ã¿ãå®è£ ãã¦masterã«mergeãããã¨ãç¹°ãè¿ãä¸æ¹ã§ãããã¥ã¡ã³ãã¯
JavaScript ã§é«éãªã³ã¼ããæ¸ããã¨ããéã«ãã¯ã¾ããã¡ãªç½ ã¨ãJSX ã®ã³ã³ãã¤ã©ã§ã©ã®ããã«å¯¾å¦ãã¦ããã®ããç´¹ä»
2. èªå·±ç´¹ä» nï®â¯ååï¼å¥¥ ä¸ç© nï®â¯çµæ´ï¼ nï®â¯ã¢ãã¤ã«ã¦ã§ããã©ã¦ã¶ãPalmscapeããXiinoãã®éçº (1996-2003) nï®â¯IPAæªè¸ã¹ã¼ãã¼ã¯ãªã¨ã¼ã¿ (2004) nï®â¯ãµã¤ãã¦ãºã»ã©ã (2005-2010) nï®â¯Japanize, Pathtraq, Q4M, mycached, ⦠nï®â¯ãã£ã¼ã»ã¨ãã»ã¨ã¼ (2010-) nï®â¯R&Dã«å¾äº Aug 24 2013 JSX - å ¬éããï¼å¹´ãè¿ã㦠2 3. altJS ã¨ã¯? nï®â¯JavaScript ã«å¤æãã¦å®è¡ãããè¨èª nï®â¯èæ¯: JavaScript ã®æ®å nï®â¯ã¦ã§ããã©ã¦ã¶ã§åãã®ã¯ JavaScript ã ã nï®â¯ãã³ãã¼éã®ç«¶äºã®çµæãå®è¡é度ãé«éã« nï®â¯ã¦ã§ããã©ã¦ã¶ä»¥å¤ã§ã JavaScript ã使ãããã« nï®â¯ãµã¼ããµã¤ã: node.js nï®â¯ã¯ã©ã¤ã¢
JSX compilerã®ã½ã¼ã¹ã³ã¼ãã§æ¤è¨¼ãã¦ã¿ã¾ãã*1ã Mode Size(KiB) Ratio original 1507 1.00 JSX minifier 277 0.18 Closure Compiler/D 602 0.40 Closure Compiler/A 301 0.20 対象ã«ããã½ã¼ã¹ã³ã¼ããJSXããå¤æããJSã¨ããããç¹æ®ãªç¶æ³ã§ãããClosure Compilerã®ADVANCED_OPTIMIZATIONSããããµã¤ãºãå°ãããªãã¾ãããã¾ããADVANCED_OPTIMIZATIONSã¨ç°ãªãJSX minifier*2ã¯ã³ã¼ããç ´å£ããå§ç¸®ã¯ä¸åè¡ããªãã®ã§ãå§ç¸®ãããã³ã¼ããåããªããªãã¨ãããã¨ãé常ã«èµ·ããã«ãããªã£ã¦ãã¾ãããããããã§ããJSXã®è±å¯ãªåæ å ±ã使ã£ã¦å§ç¸®ããã°ADVANCED_OPTIMIZATIONSããããµã¤ãºãå°
JSX ãã»ã«ããã¹ãã£ã³ã°ãã¦npm packageã¨ãã¦ãªãªã¼ã¹ãã¾ããã https://npmjs.org/package/jsx ãã¦JSXã³ã³ãã¤ã©ãJSXã§æ¸ããªãããããã§ãããããã¯ä¸»ã«JSXã³ã³ãã¤ã©ã®è³ªãé«ããããã§ããJSXã¯JavaScriptã¨æ¯è¼ããã¨å¤§è¦æ¨¡ãªéçºã«åãã¦ãããã¨ããã®ãJSXéçºãã¼ã ã®ä¸»å¼µã§ããã§ããã°ãJSXã³ã³ãã¤ã©ãJSXã§æ¸ããã¨ã«ãã質ãé«ããããã¯ãã§ããäºå®ãä»åã®ã»ã«ããã¹ãã£ã³ã°ã§typoããªãã¡ã¯ã¿æã®ã¨ã³ãã°ãé¢æ°ã®å¼æ°ééããªã©ã«ãããã°ãããã¤ãè¦ã¤ããæ¹ä¿®ããã¾ãããã»ã«ããã¹ãã£ã³ã°ã¯ã³ã³ãã¤ã©ã®å質ãé«ããä¸å©ã«ãªã£ãã¨ããã¾ãã ã¾ãããã²ã¨ã¤ãä»åã®JSXã³ã³ãã¤ã©ã®éçºã¯JSXã«ããéçºã§ããããã®éç¨ã§å¾ãç¥è¦ãæ°å¤ãããã¾ããããã«ããããã¨ãã°asã®å¤±æãnullãè¿ãã®ã§ã¯ãªãä¾å¤ãè¿ãããã«ã
JSXãã©ããã£ã¦å¦ã¹ã°ããããã¡ã¢ãã¦ããã¾ãã è¨èªä»æ§ è¨èªä»æ§ã¯ jsx.github.com ã«ããã¥ã¡ã³ããããã»ããå®ä¾ã¨ãã¦ã¯è¨èªä»æ§ã®ãã¹ãã§ãã JSX/t/run/*.jsx ãåèã«ãªãã¾ããç¹ã« JSX/t/run/*.jsx ã¯å®éã«éçºããã¨ãªãã¨é »ç¹ã«grep ãããã¨ã«ãªãã¨æãã¾ãã http://jsx.github.com/doc.html https://github.com/jsx/JSX/tree/master/t/run ã¾ããçµã¿è¾¼ã¿é¢æ°ã®æåã¯JavaScriptã¨åããªã®ã§ãªãã¡ã¬ã³ã¹ã¨ãã¦ã¯MDNãããã§ãããããå®éã®ã·ã°ããã£ã¯ lib/built-in.jsx ãè¦ãã¨ããã§ãããã DOMæä½ / ãã©ã¦ã¶API DOMç¨APIã¯ã"js/web.jsx" ãimportããå¿ è¦ããããã¨ãwindowãdocumentãã°ã
ããã°ãã¯ï¼ 第äºåã¯Dartã¨ä»ã®è¨èªã¨ã®æ¯è¼ã¨ãããã¨ã§ãDeNAçºã®JSXã¨ããããã°ã©ãã³ã°è¨èªã¨ã®æ¯è¼ãè¡ãªã£ã¦ã¿ããã¨æãã¾ããvs JSXã§ãï¼ 1åã§ã¯çºã¾ãããã«ãªãã®ã§ãè¤æ°åã«åãã¦ãããã¨æãã¾ãã ããã§ã¯ã軽ãJSXã®èª¬æãè¡ãã¾ããDartã«ã¤ãã¦ã¯ååã® Dartã§éãã§ã¿ãã.1 ãã覧ãã ããï¼ JSXã¨ã¯ãDeNAã«ãã£ã¦éçºããããªãã¸ã§ã¯ãæåã®ããã°ã©ãã³ã°è¨èªã§ãã Dartã¨åããJSXã®ã³ã¼ãã¯JavaScriptã«ã³ã³ãã¤ã«ããããããnode.jsããã©ã¦ã¶ä¸ã§åä½ããããã¨ãã§ãã¾ãã ææ³ã¯JavaScriptã«ã¨ã¦ãè¿ãã®ã§ãJavaScriptã¦ã¼ã¶ã¼ã¯ããã«æ¸ãå§ãããã¨ãåºæ¥ãã¯ãã§ãã ããã¦æ大ã®å£²ãã¯ãéçåä»ãã§ãããã¨ã ã¨æãã¾ãã éçåä»ãã¯ãæã¡ééãã«ããäºç´°ãªãã¹ããééã£ãå¤ã®ä»£å ¥ã誤ã£ãå
JSX ã®é²åé度ãå端ãªã - ããããï½ ã§ç´¹ä»ãã¦ããã ãã¦ããã¨ãããææ°ã® JSX ã§ã¯ function expression ã®å宣è¨ãçç¥ã§ããããã«ãªã£ã¦ãã¾ãããããå©ç¨ãã¦ããã¨ãã°é åã®åè¨ãæ±ããå ´åã var sum = 0; [ 1, 2, 3, 4, 5, 6, 7, 8 ].forEach(function (n) { sum += n; }); ã®ããã«ãJavaScript 㨠100% åæ§ã«æ¸ããã¨ãã§ããããã«ãªãã¾ãããçç¥å½¢ãå©ç¨ã㦠[ ... ].forEach((n) -> { sum + n; }); ã§ãããã§ãã ã¨ããã§ãã®ã³ã¼ããè¦ãç®ã¯åããªãã§ãããå®ã¯ JSX ã 㨠JavaScript ãããï¼å以ä¸éãåããã§ããã¾ã æé©åããã¾ãã¨ãããããã®ã«ã ãªãããJavaScript ã® Array#forEach ã¯é
ã¾ã master ã«ã¯ãã¼ã¸ãã¦ãªãã§ãã kazuho/user-defined-templates ãã©ã³ãã®ãã¤ã使ãã¨ã class Adder.<T> { static function f(x : T, y : T) : T { return x + y; } } class Test { static function run() : void { var n = Adder.<number>.f(1, 3); log n; var s = Adder.<string>.f("abc", "def"); log s; } } ããæé©åãªãã·ã§ã³ (--optimize inline,fold-const) ã§ã³ã³ãã¤ã«å¾ã« Test.run$ = function () { /** @type {!number} */ var n; /** @type {!string}
JSX is a statically-typed, object-oriented programming language designed to run on modern web browsers. Being developed at DeNA as a research project, the language has following characteristics. faster JSX performs optimization while compiling the source code to JavaScript. The generated code runs faster than an equivalent code written directly in JavaScript. The gain may vary, but even the optimi
JSX is a strictly-typed object-oriented programming language that is compiled to JavaScript. It aims to provide higher productivity than JavaScript through strong typing while generating code that runs faster than plain JavaScript. Some key points: - JSX code is compiled to optimized JavaScript using type information for performance gains - It has classes and functions like Java but compiles to Ja
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}