yogeshtakeo / team-pair-programming

0 stars 0 forks source link

Task 15 : Props in React #1

Open yogeshtakeo opened 1 year ago

yogeshtakeo commented 1 year ago

Task: Working with Props in React

Objective: Practice using props in React to pass data between components.

Task Overview

Task Details

  1. Project Setup:

    • Set up a new React project using a tool of your choice.
    • Create a root component (e.g., App) to manage other components.
  2. Create Parent and Child Components:

    • Create a parent component (e.g., ParentComponent) and multiple child components (e.g., ChildComponent1, ChildComponent2).
    • Render the child components within the parent component.
  3. Pass Data from Parent to Child Components:

    • Create data variables in the parent component (e.g., name, age, etc.).
    • Pass the data variables as props to the child components when rendering them.
  4. Access and Display Props in Child Components:

    • In each child component, access the received props.
    • Display the props data using JSX in the child components.
  5. Test and Refine:

    • Start the development server and run the React project.
    • Verify that the props data is passed from the parent component to the child components correctly.
    • Test different scenarios, such as passing different types of data (strings, numbers, objects) as props.

Task Submission

Encourage your students to ask questions and seek assistance if they face any challenges during the task.Certainly! Here's a task that focuses on using props in React:

Task: Working with Props in React

Objective: Practice using props in React to pass data between components.

Task Overview

Task Details

  1. Project Setup:

    • Set up a new React project using a tool of your choice.
    • Create a root component (e.g., App) to manage other components.
  2. Create Parent and Child Components:

    • Create a parent component (e.g., ParentComponent) and multiple child components (e.g., ChildComponent1, ChildComponent2).
    • Render the child components within the parent component.
  3. Pass Data from Parent to Child Components:

    • Create data variables in the parent component (e.g., name, age, etc.).
    • Pass the data variables as props to the child components when rendering them.
  4. Access and Display Props in Child Components:

    • In each child component, access the received props.
    • Display the props data using JSX in the child components.
  5. Test and Refine:

    • Start the development server and run the React project.
    • Verify that the props data is passed from the parent component to the child components correctly.
    • Test different scenarios, such as passing different types of data (strings, numbers, objects) as props.

Task Submission

Take a screenshot of the web browser displaying the rendered React component . Share the screenshot Optionally, submit the code files (App.js and any other relevant files) for review with the GitHub Repository.

sandessth commented 1 year ago

Team: Namkhang and Sandesh Git URL: https://github.com/yogeshtakeo/team-pair-programming/tree/nam-san code frontpage git

dinakc commented 1 year ago

Deena KC https://github.com/yogeshtakeo/team-pair-programming.git

Image Image Image

ashmaupret100 commented 1 year ago

Team : Ashma and Dina Github_url: https://github.com/yogeshtakeo/team-pair-programming.git

Image

Image

Image

KabinaThapa commented 1 year ago

Kabina Thapa

Image Image Image Image Image Image

https://github.com/yogeshtakeo/team-pair-programming/tree/Kabina-Jharana

Jharanatmg commented 1 year ago

Jharana Github url -https://github.com/yogeshtakeo/team-pair-programming.git

Image

Image

junuthapa011 commented 1 year ago

Name: Babisha and Junu GitHub URL: https://github.com/yogeshtakeo/team-pair-programming/tree/babisha-junu/Task15-Props

Image

Image

Image

Image

babisha commented 1 year ago

Name: Babisha and Junu GitHub URL: https://github.com/yogeshtakeo/team-pair-programming/tree/babisha-junu/Task15-Props

Image