Skip to content

Instantly share code, notes, and snippets.

View AllanSaleh's full-sized avatar
🏠
Working from home

Allan AllanSaleh

🏠
Working from home
View GitHub Profile

Discussion Questions: Props vs. State

  1. What is the difference between props and state in React?
  2. When would you use state instead of props?
  3. Take a look at https://learning.flatironschool.com. Pretend you were going to recreate a specific page. What top level components would you have? What props would they receive and what state would they own? What components would they have as children?
  1. 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
  1. When would you use props in react?
  2. Assuming UserDetail is a component, what will it's props be if it's rendered as follows:

React Introduction Discussion

After seeing the code along and doing your first lab, discuss these ideas with your friends:

  1. From your understanding, what is React?
  2. What concept stood out to you about React?
  3. How different is coding React apps from coding with pure JS?
  4. What benefits do you anticipate from using React?
  5. How would React help you towards having a more structured project management experience?

After discussing this, one member of the team should write down what the group reached in the comment sections.

  1. What is a BrowserRouter component? What is the purpose of it?
  2. What is the path property in a route?
  3. What is a param and how can we pass them?
  4. What is Link and why does it have a to attribute?