Skip to content

sonni0101/react-jsx-demo-students

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSX and V DOM

Concepts

  • What is JSX?
    • JSX is a syntax extension for JavaScript that lets you write HTML-like markup inside a JavaScript file. Although there are other ways to write components, most React developers prefer the conciseness of JSX, and most codebases use it.
  • What is VDOM?
    • It is the representational DOM / shadow DOM
    • Performance
  • The Rules of JSX
    • JavaScript in JSX : Curly Braces
        <div>{1+1}</div>
    
    • JSX: Putting markup into JavaScript
        const h1Element = <h1>Hello World</h1>;
    
    • Return a single root element. Use Fragments!
          <>
    		<TodoList />
    		<MyFirstComponent />
    	</>
    
    • Close all the tags
    • camelCase all most of the things! eg: className, htmlFor
    • PascalCase for Components! eg. MyFirstComponent

Installation Steps

  • Clone this project git clone https://github.com/ankurbag/react-jsx-demo-students.git
  • Go to folder cd react-jsx-demo-students
  • Run npm install or npm i
  • Run npm start
  • Open http://localhost:3000 to view it in your browser.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 50.3%
  • HTML 32.3%
  • CSS 17.4%