- Each person in your group should take one of the following topics and explain it to the group in their own words. Be sure to provide concrete examples in your explanations. For the remaining topics, discuss them as a whole group.
- Node Package Manager
- Imperative vs Declarative
- Components
- JSX
- Imports and Exports
- Props
- When would you use props in react?
- Assuming UserDetail is a component, what will it's props be if it's rendered as follows:
const user = {name: 'Spider Man', age: 32}
<UserDetail title="Profile Page" dog="Fido" user={user} />
1:
-NPM: is the largest library to download packages
-Imperative vs Declarative: Imperative will use the real DOM (getElement...append..)
Imperative programming is like giving a chef step-by-step instructions on how to make a pizza. Vanilla JavaScript is an example of Imperative programming. Declarative programming is like ordering a pizza without being concerned about the steps it takes to make the pizza.
-Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and return HTML. Components come in two types, Class components and Function components, in this tutorial we will concentrate on Function components.
-JSX: javascriptXML which allow us to write HTML in REACT
-Imports and Exports: Importing and exporting in React JS will help us write modular code, i.e., splitting code into multiple files. Importing allows using contents from another file, whereas exporting makes the file contents eligible for importing.
-props: using properties to change the information inside components as we wish.
2-use props to pass data from one component to another one, it is like the arguments of JS functions
3-the props will be : title ,dog ,user
Sena,Miray,Ahmad,Batoul