Skip to content

This project is shown that how we use jsx in our react. Learn about functional component, composition of component

Notifications You must be signed in to change notification settings

Kalpesh1012/NamasteReact-Chapter03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chapter 3 Laying the foundation

1) What is JSX?

JSX is a like a HTML, but it doesn’t mean that JSX is a HTML inside JavaScript. JSX makes it easier to write and add html in react.

Example: const heading=

heading1

.

2) Superpowers of JSX?

Using JSX, we can write markup or HTML inside JavaScript, providing us with a superpower to write logic and markup of a component inside a single .jsx file.

3) {TitleComponent} vs {} vs {< /TitleComponent>}

  • TitleComponent: It renders React Elements
  • {}: Renders the React Functional Component
  • {}: In this component we can write another component.

4)Role Of “type” attribute in script tag? Which option can I use there?

The attribute indicates the type of script represent by the element. We can use other options like: text/javascript (this is a default), module or datablock.

About

This project is shown that how we use jsx in our react. Learn about functional component, composition of component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published