Register
Morning orientation
Learning Objectives
Planning during the week
๐ฃ Steps
If you haven’t done so already, choose someone (volunteer or trainee) to be the facilitator for this morning orientation block. Choose another to be the timekeeper.
๐๏ธ The Facilitator will:
- Assemble the entire group (all volunteers & all trainees) in a circle
- Briefly welcome everyone with an announcement, like this:
๐ฌ “Morning everyone, Welcome to CYF {REGION}, this week we are working on {MODULE} {SPRINT} and we’re currently working on {SUMMARISE THE TOPICS OF THE WEEK}”
- Ask any newcomers to introduce themselves to the group, and welcome them.
- Now check: is it the start of a new module? Is it sprint 1? If so, read out the success criteria for the new module.
- Next go through the morning day plan only (typically on the curriculum website) - and check the following things:
Facilitator Checklist
- Check the number of volunteers you have for the morning
- Check someone is leading each session
- Describe how any new activities works for the group
- Decide how best to allocate trainees and volunteers for a given block - most blocks will make this clear
โฐ The Timekeeper will:
- Announce the start of an activity and how long it will take (check everyone is listening)
- Manage any whole class timers that are used in an activity
- Give people a 10-minute wrap-up warning before the end of an activity
- Announce the end of an activity and what happens next
Energiser
Every session begins with an energiser. Usually there’s a rota showing who will lead the energiser. We have some favourite games you can play if you are stuck.
- Traffic Jam: re-order the cars to unblock yourself
- Telephone: draw the words and write the pictures
- Popcorn show and tell: popcorn around the room and show one nearby object or something in your pocket or bag and explain what it means to you.
Morning Break
A quick break so we can all concentrate on the next piece of work.
๐ Pokedex Workshop
Learning Objectives
Pokedex 2
Stepping through the Pokedex app, we will learn about events and interactivity.
Requirements
This workshop is to practice building a React app from scratch. You will be building a Pokedex app that displays information about Pokemon. It’s a staged workshop which can be run over multiple weeks. This stage focuses on events, which are covered in the prep work for this sprint. If you haven’t done the prep or the previous workshop, you will find this workshop hard to understand.
Handling events
In this exercise we will extend our Logo component to log to the console when clicking on the image. Split into your React groups. Set a whole class timer for 10 minutes.
๐น๏ธExercise 1
- Open your
pokedexReact application and open theLogo.jsfile. - Add a function named
logWhenClickedwithin theLogocomponent. - In the
logWhenClickedfunction,console.loga message (it doesn’t matter what the message is). - Add an
onClickhandler to the<img>that will calllogWhenClicked. (Hint: look at theClickLoggercomponent above). - In your web browser, try clicking on the logo image. What do you see in the JavaScript console?
- Discuss what would happen if you changed your code to
onClick={logWhenClicked()}. Can you explain why?
Passing functions as props
In this exercise, we’ll move the logWhenClicked function in the Logo component to the App component. Then we’ll make App pass those variables as props to the sub-components. Your app should still look the same as before. Set a whole class timer for 10 minutes.
๐น๏ธExercise 2
- Open the
pokedexReact application and open theLogo.jsfile. - Copy and paste the
logWhenClickedfunction from theLogocomponent to theAppcomponent. - Pass the
logWhenClickedfunction reference as a prop to theLogocomponent. (Hint: look at theClickLoggerAppcomponent above for an example). - In the
Logocomponent change theonClickprop so that it passesprops.handleClick. (Hint: look at theFancyButtoncomponent above for an example). | - Discuss what you think will happen when you click the logo image now. Predict and then test. Can you explain why?
useState
In this exercise, we’ll add a button to the CaughtPokemon component which adds one to the number of Pokemon you have caught. Set a whole class timer for 20 minutes.
๐น๏ธExercise 3
- Open the
pokedexReact application and open theCaughtPokemon.jsfile. - Create a new state variable with
useState. It should be namedcaughtand be initialised to0 - Within the JSX, there should be a “hard-coded” number 0. Replace it with your new
caughtstate. - Add a button to the component with an
onClickhandler that calls a function calledcatchPokemon. - Create the
catchPokemonfunction and have it update thecaughtstate so that it is increased by 1 on each click. Click here if you are stuck.You will need to call the set state function (the 2nd item in theuseStatearray) withcaught + 1. - Write down the things that will happen when you click the button. Compare your list with your group and discuss.
Showing a list of Pokemon
In this exercise, we’ll change the CaughtPokemon component to show a list of Pokemon that we have caught instead of a number. Set a whole class timer for 15 minutes.
๐น๏ธExercise 4
- Open the
pokedexReact application and open theCaughtPokemon.jsfile. - Change the
useStateto be initialised to an empty array ([]) - There will now be a bug in your app! We don’t see how many Pokemon we have caught. Discuss with another trainee what you think the problem is.
- Change the JSX to instead render
caught.length. Does this fix the bug? - Let’s now show the names of the Pokemon we have caught. Render a
<ul>element within the component. Then use themapmethod to loop through each item in thecaughtarray and render it in an<li>element. - Change the
catchPokemonfunction to add a new Pokemon (it doesn’t matter which one) onto thecaughtarray. (Hint: use theconcatmethod.)
(STRETCH GOAL) Generate a random Pokemon each time you click the button Hint insideThis StackOverflow post may be helpful.
Acceptance Criteria
- The logo click handler is passed from
Appas a prop function CaughtPokemontracks a caught state variable withuseState- Clicking catch adds a Pokemon name to the caught array
- Caught Pokemon names are rendered in a list
Note: inspiration for this workshop came from Kent Dodd’s Beginner React course
Community Lunch
Every Saturday we cook and eat together. We share our food and our stories. We learn about each other and the world. We build community.
This is everyone’s responsibility, so help with what is needed to make this happen, for example, organising the food, setting up the table, washing up, tidying up, etc. You can do something different every week. You don’t need to be constantly responsible for the same task.
Study Group
Learning Objectives
Trainees
This is time for you to get help with whatever you need help with.
If you didn’t understand something in the prep, ask about it.
If you were struggling with a backlog exercise, get help with it.
If you weren’t quite sure of something in a workshop, discuss it.
If you don’t have any problems, keep working through the backlog until you need help.
It can be useful to get into groups with others facing the same problem, or working on the same backlog item.
Volunteers
Don’t be scared to approach people and ask what they’re working on - see if you can help them out, or stretch their understanding.
If lots of people have the same problems, maybe you can put together a demonstration or a workshop to help them understand.
If absolutely no one needs help, consider reviewing some PRs using the process and guidelines in the #cyf-code-review-team Slack channel canvas.
Breaks
No one can work solidly forever! Make sure to take breaks when you need.
๐๏ธ Code waiting for review ๐
Below are trainee coursework Pull Requests that need to be reviewed by volunteers.
WM5 | LAURA_SANTIAGO | MODULE-REACT | FROM SCRATCH | WEEK 3 ๐
Learners, PR Template
Self checklist
- I have committed my files one by one, on purpose, and for a reason
- I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- I have tested my changes
- My changes follow the style guide
- My changes meet the requirements of this task
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.
Start a reviewWM5 | LAURA SANTIAGO| MODULE_REACT | HIGH_SCORES_TABLE | LEVEL 1 & 2 ๐
Learners, PR Template
Self checklist
- I have committed my files one by one, on purpose, and for a reason
- I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- I have tested my changes
- My changes follow the style guide
- My changes meet the requirements of this task
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.
Start a reviewBump vite from 5.0.10 to 5.0.13 in /high-score-tables ๐
Bumps vite from 5.0.10 to 5.0.13.
Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
WM5 | AISHA_ATHMAN_LALI | MODULE_REACT | HIGH_SCORES_TABLE | LEVEL 1 & 2 ๐
Self checklist
- I have committed my files one by one, on purpose, and for a reason
- I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- I have tested my changes
- My changes follow the style guide
- My changes meet the requirements of this task
This is a PR for the High-Scores Table challenge. I have completed level one where I have displayed the given data in tables as requested in the instructions
Questions
I am still struggling with the table. Is there a better way to go about it?
Start a reviewWM5 | ADNIYA YOUSAF | FROM SCRATCH | WEEK 3 ๐
Self checklist
- I have committed my files one by one, on purpose, and for a reason
- I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- I have tested my changes
- My changes follow the style guide
- My changes meet the requirements of this task
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.
Start a reviewAfternoon Break
Please feel comfortable and welcome to pray at this time if this is part of your religion.
If you are breastfeeding and would like a private space, please let us know.
Team Project
Learning Objectives
In this module you are working in a team to build a React app. (You should have created your group already.)
Take this opportunity to work with your team on your React app. You can use this time to work on your app, to discuss your app with your team, ask questions and get help with blockers.
You can use any study group time to work on your product.
๐๏ธ Code waiting for review ๐
Below are trainee coursework Pull Requests that need to be reviewed by volunteers.
Bump ws from 8.15.1 to 8.17.1 ๐
Bumps ws from 8.15.1 to 8.17.1.
if (++count === 2000) break; }
Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
Bump vite from 5.0.12 to 5.0.13 ๐
Bumps vite from 5.0.12 to 5.0.13.
Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
Featurebookingstate ๐
Learners, PR Template
Self checklist
- I have committed my files one by one, on purpose, and for a reason
- I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- I have tested my changes
- My changes follow the style guide
- My changes meet the requirements of this task
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.
Start a review