Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

learningReact

i'm just trying to write what i understand


React Components

It is a piece of UI - React component names must always start with a capital letter, while HTML tags must be lowercase.

JSX

  • You have to close all the tags <img />, <br />, etc.
  • We can return only one JSX tag If want to remove multiple tags return in <div> <div/> or in <> </>.
  • In react jsx instead of class="" we use className="".
  • Curly braces let you “escape back” into JavaScript, example: {user.name}, {'Photo of ' + user.name}.
  • Inline CSS used as style={{}} i.e., style={{ width: user.imageSize, height: user.imageSize }}.
  • there is no special syntax for writing conditions it is same as Js.
  • Pass reference only in the onClick function without parenthesis onClick={handleClick}

About

i'm just trying to write what i understand

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages