React js notes for Professionals
Download 1.01 Mb. Pdf ko'rish
|
ReactJSNotesForProfessionals
- Bu sahifa navigatsiya:
- Basic Inclusion
type
= "text/javascript"
src
= "/path/to/react-dom.js" >
type
= "text/javascript" > // Use react JavaScript code here or in a separate file
< script type = "text/javascript" >
// create a React element rElement
var rElement = React.
createElement ( 'h1' ,
,
);
// dElement is a DOM container
var dElement = document. getElementById ( 'example' );
// render the React element in the DOM container ReactDOM. render (
, dElement );
script
>
id = "content" >
type
= "text/babel"
src
= "scripts/example.js" >
id = "content" >
className "firstComponent" Hello, world! I am a FirstComponent.
hello World
id
type
= "text/babel"
src
= "app.jsx" >
id
src
= "app.js"
>
id
src
= "build/bundle.js"
charset
= "utf-8"
>
id = "app"
/>
src
= "public/bundle.js" > |