Year #3, Week #16 đ» đȘ
Homework Plan
- 1 day Monkey Assignment #24 đ
- 1 day review all flashcards in your (new Netlify) app.
- 1 day read King C chapter 13 đ
- 1 day King C programming projects đ
- 1 day touch typing practice
- 1 day React Router Tutorial Assignment
- 1 day Flashcards Webapp (React Router) Assignment
- 1 day watch CS50
CS50 Lecture #4 segment,
from beginning to
24:03
- 3 days Execute Program homework
Monkey #24 đ
- Address all feedback from prior MRâs, and merge.
- Create a new branch.
- Double-check that you did the first two steps.
- Start where you left of last time, after the 3.7 Return Statements
section, which is labeled 3.8 Abort! Abort! Thereâs Been a Mistake!, or:
Error Handling. Complete the section.
- Commit your work.
- As always, make sure to try to do as much as you can without the videos, but
always also watch the videos and update your code to (mostly) match.
- Video link
- Submit a MR, Review your diffs and fixup!!, then slack the MR url
King C: Chapter 13 (Strings) đ đ»
- First, make sure youâve slowly and carefully read all of chapter 13 of King C.
assignment.
- Merge your
king-c
repo branch from last week, and CREATE A NEW BRANCH. - Then, do the following programming projects:
1, 3, 4, 5, 9, 13, 16, 18
. For
project #3, start from
this code - before you slack me the URL, review your own diffs, clean up anything you
notice, then slack me the URL.
React Router Tutorial Assignment
- Before you start, read through all the steps of this assignment, then come
back and do each one.
- Start by taking a few minutes to read through and examine each code snippet on
this page. You
donât have to fully understand everything, just get yourself oriented. The
next steps will walk you through using these concepts, so theyâll click more
when you build something with them.
- Next, head over to the
tutorial page.
You are going to be completing this tutorial in its entirety.
- You should work locally for this. By that, I mean, you must work locally for
this project. If you donât, installing the dependencies will take you WAY too
much time.
- Read the top portion of the tutorial, stopping when it says âRecommended:
StackBlitzâ.
- Donât try to open that url, itâs not unblocked, youâre going to be doing it
locally, using a bundler.
cd
into a dir where you do your local HTC stuff (probably ~/htc
). Instead
of running one of the commands they suggest, run this instead, so you get
typescript:
npx create-react-app router-tutorial --template typescript
- the installation will take a minute or two.
- when itâs done,
cd
into the router-tutorial
directory, and create a new
git repository. Add a .gitignore
ignoring the node_modules/
dir, and
commit things as they currently stand. - before you go any further, create a new project on Gitlab, and push up your
master
branch. Becase you didnât clone it down from GitLab, youâll need to
connect your local repo manually, using git remote
. If you canât remember
how to do that, search the homework new stuff. - Once youâve got things pushed up to GitLab, CREATE A NEW BRANCH. If you
forget this step, you owe me some delicious vegan cookies. đȘ
- then, start following the tutorial where it says
Then install React Router dependencies
. - NOTE: your file will be
src/App.tsx
not src/App.js
, since the command
I gave you started you up in typescript mode. For all of the steps, I want you
to be creating Typescript files with types, instead of the vanilla js they
show. - slowly and carefully work through all of the steps, trying out everything in
your browser as you proceed. The only section you can skip is the one called
Custom Behavior â thatâs sort of a digression, and not really something
you are supposed to implement.
- when youâve finished, commit your work.
- check if youâve got
netlify
installed locally by running which netlify
. If
you donât, try running npm install netlify-cli -g
. (If you get permission
errors, install it locally by running npm install netlify-cli
, then prefix
the deploy commands with npx
to use your local copy.) - once youâve ensured
netlify
is installed locally, check to make sure youâve
got the auth information by catting out your ~/.bashrc
file. If you donât
see exported bash variables for netlify, ssh into the htc pi, cat out your
~/.user_env
file, and copy the relavent variables to your local ~/.bashrc
. - now that youâve got netlify ready to use locally: deploy your react router
tutorial site to netlify.
- submit a MR, review and clean up your diffs, and slack me both the MR url
and the Netlify url.
Flashcards WebApp (React Router) Assignment
- Make sure youâve completed the âReact Router Tutorialâ assignment completely
first (although you donât need to wait until I review that one to start this
assignment).
- in your flashcards web app repo, make sure youâve addressed all feedback from
any prior Merge Requests, merge, and pull, and check out a new branch.
- Add react-router, and add 3 main routes to your
src/index.tsx
file. One for
/
(cards), one for /signup
, and one for /login
. - the
/signup
and /login
routes should render your signup and login
components, centered in the screen. - the
/
route should render your cards - donât worry about switching between the screens in any way, weâll get to that
later. For now, just make it work so that if you update the URL in the
browser, the different pages are loaded and visible.
- commit your work
- submit a MR
- review your own diffs, and clean up anything you notice.
- if your name rhymes with âMarriotâ double-check that you did the previous
step.
- deply a draft URL to netlify
- slack me the MR and Netlify draft URL