Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Part 3 - Components & Hierarchies #1336

Closed
3 tasks
vegetabill opened this issue Apr 11, 2020 · 10 comments · Fixed by #1347 or #1442
Closed
3 tasks

React Part 3 - Components & Hierarchies #1336

vegetabill opened this issue Apr 11, 2020 · 10 comments · Fixed by #1347 or #1442
Assignees
Labels
MEDIUM Intermediate length or difficulty priority get this done first if possible

Comments

@vegetabill
Copy link
Collaborator

vegetabill commented Apr 11, 2020

Task: The previous contributor was unable to complete this issue, but they got quite far. Please:

For FAQs on how to contribute, see: https://github.com/Techtonica/curriculum/blob/main/CONTRIBUTING.md


Original issue description:

Child task of Epic #1301

The previous two lessons focused on props and state inside of a single component. Now we need to expand on that foundation to cover how props and state are passed along component hierarchies and when it makes sense to split some JSX into a new component.

Use our Lesson Template v2

Topics to Cover

  • Different between Components and built-in JSX tags like <button>
  • How to refactor code where all JSX is in one component into separate components
    • Reasons to do so, duplication. The code exercise could be turning a map function that creates a snippet JSX to one that creates instances of another component
    • Keeping components small and single-purpose
  • props.children
  • Using 3p components like reactstrap
  • Passing callback functions to have children allow the parent to decide what an onClick does
  • Passing along state from a parent into a child component

Example Code

  • Example code should run in a CodePen or similar. It should not need Babel/Webpack, etc
  • Class components only (no Functional)

This lesson should go in the ./react-js/react-part-3-hierarchies.md and a link added to the main README.md along with the other React lessons.

@vegetabill vegetabill added gssoc20 MEDIUM Intermediate length or difficulty labels Apr 11, 2020
@vegetabill vegetabill added this to the H2-2020 Start (June) milestone Apr 11, 2020
@annu12340
Copy link
Contributor

I would like to work on this issue

@annu12340
Copy link
Contributor

annu12340 commented Apr 14, 2020

Could you please elaborate on what is meant by " Using 3p components like reactstrap " and about the refactoring of the code. I didn't get it

@Kundan28
Copy link
Collaborator

Could you please elaborate on what is meant by " Using 3p components like reactstrap " and about the refactoring of the code. I didn't get it

@vegetabill

@ashishnagpal2498
Copy link
Contributor

I think what he mean to say is using 3rd party Components like Reactstrap which include inbuilt CSS in their component.

@Kundan28
Copy link
Collaborator

I think what he mean to say is using 3rd party Components like Reactstrap which include inbuilt CSS in their component.

Yeah, I to think so...

@Kundan28
Copy link
Collaborator

@annu12340 Do you want to work on this issue ?

@annu12340
Copy link
Contributor

Yes

@Kundan28
Copy link
Collaborator

@annu12340 Please go through https://bit.ly/2wQxqLy and after you have filled the forms mentioned inside you could start working on this issue.

@annu12340
Copy link
Contributor

@annu12340 Please go through https://bit.ly/2wQxqLy and after you have filled the forms mentioned inside you could start working on this issue.

I have already done that part :)

@Kundan28
Copy link
Collaborator

@annu12340 Please go through https://bit.ly/2wQxqLy and after you have filled the forms mentioned inside you could start working on this issue.

I have already done that part :)

Okay, then you could start working on the issue.

@vegetabill vegetabill linked a pull request Apr 20, 2020 that will close this issue
@alodahl alodahl reopened this May 16, 2020
@alodahl alodahl removed the gssoc20 label Jun 1, 2020
@alodahl alodahl added the priority get this done first if possible label Jun 19, 2020
@vegetabill vegetabill self-assigned this Jun 24, 2020
@vegetabill vegetabill removed their assignment Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MEDIUM Intermediate length or difficulty priority get this done first if possible
Projects
None yet
5 participants