Upcoming JS3 threads 🧵 Weeks 9 - 12 #315
Replies: 6 comments 8 replies
-
Week 9Learning threads 🧵Let’s build a mental model for mapping data to the user interface Broadly speaking, it goes data or state -> render UI The focus of this session will be to focus on how we can map data ( stored in-memory ) to the elements that are rendered in the UI. In particular, how we can go from an array of data like an array of objects to a list of items that are rendered on the page. At first, we can introduce the idea of taking a datum ( JS object) and mapping that to an element on the UI ( using Provisional section headings:Data to UI, Working with a single datum, Handling multiple items of data, for.. of loop implementation, Introducing |
Beta Was this translation helpful? Give feedback.
-
Week 10Learning threads 🧵Let’s build a mental model for understanding how data is transferred across the internet Broadly speaking, it goes fetch data from remote source -> store state -> render UI After seeing how to map data (in-memory) to the UI this week we want to motivate and develop the idea of fetching data across the network. Trainees can develop their understanding of HTTP requests ( focused particularly on GET ) and then lead on to using Provisional section headings:How the internet works - intro to networks, HTTP etc we can reuse this content here: https://www.youtube.com/watch?v=Dxcc6ycZ73M&list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7, Web APIs, Reading data from a remote Web API, Using |
Beta Was this translation helpful? Give feedback.
-
Week 11Learning threads 🧵Let's build a mental model for reacting to user events Broadly speaking, it goes fetching data -> storing state -> user event -> update state -> re-render the UI I think for week 11 we can tie together some of the threads from previous weeks. We could focus on updating the state and re-rendering the UI: this will allow us to bring together events, handling state and mapping data to the UI. Provisional section headings:Problem: reacting to user adding [search input], Break down the problem, Capturing the user event, Updating state, Re-rendering the UI |
Beta Was this translation helpful? Give feedback.
-
Week 12I think we should use this week for trainees to do a hackathon / project making use of their knowledge of DOM, and |
Beta Was this translation helpful? Give feedback.
-
I think these generally look really solid! I'm curious how far down the "state -> render" road you're thinking of going. Right now in JS3 we don't teach the idea of state (or rendering based on state) at all, we just show how to imperatively create elements, and that sometimes we need to delete some elements. I would love it if when we got to React, the idea of state + render was already in people's minds, and they could see more obviously "React is just a way of simplifying and adding supporting structure to what we're already doing". But I'm worried that each of the weeks we have already has way too many new concepts to be able to cover this. I wonder if we could steal a week from React? If we add a week 13 (or week 12 and move week 12 to 13) where we just focus on the state -> render pattern, maybe it simplifies what we need to teach in React a bit (and also will help deeper understanding when it's introduced)? |
Beta Was this translation helpful? Give feedback.
-
I would consider swapping weeks 10 and 11. This is realistically our first introduction to callbacks and asynchrony, and "I clicked and something happened" has many fewer new moving parts than "I did something called fetch and at some later point something maybe happened or maybe there was an error or maybe I didn't wire up my promises correctly and nothing happened"... |
Beta Was this translation helpful? Give feedback.
-
Hello folks,
Here follows a proposal for the content in the remaining weeks of JavaScript.
The topics will be similarly focused to what is on the current curriculum but with some rearrangements. Let me know what you think.
Beta Was this translation helpful? Give feedback.
All reactions