+ Prerequisite to get started{' '} + + react.js + + : +
+- {techs}
diff --git a/02_Day_Introduction_to_React/02_introduction_to_react.md b/02_Day_Introduction_to_React/02_introduction_to_react.md
index 91187c5..960bbf5 100644
--- a/02_Day_Introduction_to_React/02_introduction_to_react.md
+++ b/02_Day_Introduction_to_React/02_introduction_to_react.md
@@ -29,6 +29,11 @@
- [Commenting JSX element](#commenting-jsx-element)
- [Rendering JSX Element](#rendering-jsx-element)
- [Style and className in JSX](#style-and-classname-in-jsx)
+ - [Injecting data to JSX Element](#injecting-data-to-jsx-element)
+ - [Injecting a string to JSX Element](#injecting-a-string-to-jsx-element)
+ - [Injecting a number to JSX Element](#injecting-a-number-to-jsx-element)
+ - [Injecting an array to JSX Element](#injecting-an-array-to-jsx-element)
+ - [Injecting an object to JSX Element](#injecting-an-object-to-jsx-element)
- [Exercises](#exercises)
- [Exercises: What is React?](#exercises-what-is-react)
- [Exercises: Why React?](#exercises-why-react)
@@ -36,6 +41,7 @@
- [Exercises: JSX Elements](#exercises-jsx-elements)
- [Exercises: Inline Style](#exercises-inline-style)
- [Exercises: Internal Styles](#exercises-internal-styles)
+ - [Exercise: Inject data to JSX](#exercise-inject-data-to-jsx)
## Getting Started React
@@ -45,7 +51,7 @@ Prerequisite to get started with React. You should have a good understanding of
- CSS
- JavaScript
-If you have the above skills you will enjoy doing React. React for Everyone contains anything you need to know about react. In every section, it has some exercises and mini-projects and it is recommended to work on them. This 30 Days Of React challenge will help you learn the latest version of React and the old version step by step. The topics are broken down into 30 days, where each day contains several topics with easy-to-understand explanations, real-world examples and many hands on exercises.
+If you have the above skills you will enjoy doing React. The 30 Days Of React challenge contains anything you need to know about react. In every section, it has some exercises and mini-projects and it is recommended to work on them. This 30 Days Of React challenge will help you learn the latest version of React and the old version step by step. The topics are broken down into 30 days, where each day contains several topics with easy-to-understand explanations, real-world examples and many hands on exercises.
This challenge is designed for beginners and professionals who want to build a web application using React and JavaScript.
### 1. What is React?
@@ -813,6 +819,741 @@ Instead of style object using regular styling method is more easier than the abo

+#### Injecting data to JSX Element
+
+So far, we used static data on the JSX elements but we can also pass different data types as a dynamic data. The dynamic data could be string, number, boolean, array or object. Let us see each of the data types step by step. To inject data to a JSX we use the {} bracket.
+
+```js
+const welcome = 'Welcome to 30 Days Of React'
+const title = 'Getting Started React'
+const subtitle = 'JavaScript Library'
+const authorFirstName = 'Asabeneh'
+const authorLastName = 'Yetayeh'
+const date = 'Oct 1, 2020'
+
+// JSX element, header
+const header = (
+
+ Instructor: {authorFirstName} {authorLastName}
+
+ Instructor: {authorFirstName} {authorLastName}
+ {welcome}
+ {title}
+ {subtitle}
+ {welcome}
+ {title}
+ {subtitle}
+
+ {numOne} + {numTwo} = {numOne + numTwo} +
+) + +const yearBorn = 1820 +const currentYear = new Date().getFullYear() +const age = currentYear - yearBorn +const personAge ={age}
+``` + +As you can see in the above example, it is possible to do some arithmetic calculation and ternary operations. + +##### Injecting an array to JSX Element + +To give example for an array, let us change the HTML, CSS, JavaScript an array and inject it to the main JSX element below. We will cover in much detail in rendering lists section. + +```js +const techs = ['HTML', 'CSS', 'JavaScript'] + +// JSX element, main +const main = ( ++ Prerequisite to get started{' '} + + react.js + + : +
+