Open thebearingedge opened 3 years ago
@thebearingedge
Tim, I have double checked this and have gotten everything. A question for you. I'm going to Slack this to you as well.
@Smith-Steve Hi Steve! The methods of your components are generally only going to be calling each other or called by the React framework. The main reason to choose an "arrow method" is to avoid having to bind it in your constructor. The JavaScript engine interprets them as follows.
This is what you write:
class Example {
constructor() {
}
aMethod = () => {
}
}
And this is how the JavaScript engine interprets it:
class Example {
constructor() {
this.aMethod = () => {
}
}
}
It's a new language feature that is very near being official, but it's not quite there yet. It's at stage 3 of the proposal process.
Hi Steve, here's a code review as we discussed via Slack. I'll do a separate UI review. The cleanup should come first as it's much easier to make behavioral and visual changes to the code when the code is clean. In some cases, I point to specific lines of code, but you should be looking out for these issues throughout the entire code base.
As always, make sure you test your app after each change to confirm that it still works as expected. Also commit after each change.
✅ Task List
lower-kebab-case
. I looked inserver/lib/
and there is a seemingly random mix of casing conventions likecamelCase
and whatevernodeMailer-transporter.js
is.nodemailer
is one word, all lowercase. Every file and folder in your entire project should belower-kebab-case
.require()
andimport
statements. Built-in Node.js modules and npm packages should come first, followed by your own modules. This should be applied to every file in your project. An example of disorganized imports is here.server/index.js
. Review theexpress-error-handling
exercise and move yourerrorMiddleware
registration to just before yourapp.listen()
.app.jsx
that simply rendershome.jsx
. Cut out the middleman. Just make Home your App (and rename/remove files accordingly).client/
directory. Avoid ever merging anything into yourmaster
branch that isn't done yet.kebab-case
for all of them and notcamelCase
.