React Learning Journey Day 2

Victoria
Jul 8, 2021

.map in JSX

we can use liArray inside {} to show the same lists of items.

Keys in JSX

Keys are unique in JSX. They are used to identify the order or if there are something to be memorized (like if it has been checked before or not). Otherwise you do not need to use them

use key in the tag so that each item will have a key as person_1 person_2 etc.

Write React without JSX

Write in React without JSX

When a JSX element is compiled, the compiler transforms the JSX element into the method that you see above: React.createElement(). Every JSX element is secretly a call to React.createElement().

React Component

React.Component is a JavaScript class. To create your own component class, you must subclass React.Component. You can do this by using the syntax class YourComponentNameGoesHere extends React.Component {}.

Component class variable names must begin with capital letters! This adheres to JavaScript’s class syntax.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Victoria
Victoria

Written by Victoria

"What if I fall?" "Oh my darling, but what if you fly?"

No responses yet

Write a response