Add require, file paths & NPM to JS-3 Week 3 #218
Description
Which module(s) and week(s) does this change effect?
Module(s): JS3
Week(s): 3
What is the work that needs to be done?
Add lesson content to show how to use the require
function and packages from NPM. This would also include some content about file paths (including relative paths with ./
).
We could consider reworking some of the content in #189, as it includes interaction with a simple (and fun!) NPM package, which trainees could then recreate to learn about require
.
Why is this work important to do?
There have been some recent discussions about when we teach these important aspects of JS.
In this thread: #166 (comment), it was pointed out that we don't teach anything about the require
function (and import
) or interact with NPM packages until the React module.
Additionally, in this thread: #166 (comment), we discussed how file paths in the context of JS are often forgotten about, but are quite important in modern apps. Similar to the point above, currently we do not teach about file paths (in JS) until the React module.
There are 2 problems with this:
- Paths,
require
/import
and NPM are very useful outside the React module, so we should teach them separately - The first week of React is already fairly packed with content, so there is not much time to practice the concepts
Additional context
This was discussed at the syllabus team meeting on 2021-03-17.
Who might need to know about this change?