CodeYourFuture / syllabus-archive

[ARCHIVED] Please use https://github.com/CodeYourFuture/syllabus
https://codeyourfuture.github.io/syllabus-master
74 stars 116 forks source link

React 4: Add introduction to React Router #299

Closed llh1 closed 5 years ago

llh1 commented 5 years ago

Add optional React module (that we will do in Scotland) to introduce routing to students.

40thieves commented 5 years ago

Thanks for the contribution @llh1! Looks great :)

I've wondered in the past whether we should have an "extras" section for content like this. I deliberately left it out of the main course because I felt that it wasn't crucial to know for the majority of our students. But as an optional tutorial I think it's great.

How are you approaching teaching this lesson? Will all of the class take this lesson? My general thought is that it introduces several concepts at once (e.g. <BrowserRouter> - and the concept of providers - and <Route> together), which I feel some might struggle with. However I think that if we target it at the more advanced members of the class only, then I think it's fine.

llh1 commented 5 years ago

Hi @40thieves, sorry I missed this message, we taught React Router to everyone here in Glasgow, we didn't spend too much time on it, just a quick introduction with exercise, so they know it exists and that they can use it if needed. We didn't deal with the complexity of React Router, and just mentioned that if they want to define some route, they need to wrap everything in a top component called BrowserRouter, which comes from React Router library. I think the practice went well and that they saw the point of using this.

40thieves commented 5 years ago

Sounds good 👍