Skip to content

Instantly share code, notes, and snippets.

@TedSean
TedSean / node.md
Created January 22, 2021 12:48 — forked from kevinvoduy/node.md
node

Node Notes

Study up mother fucker

1. What is Node? Where can you use it?

Node is a server side scripting language based on Google's V8 JavaScript engine. It is used to build scalable programs that are computationally simple but frequently accessed.

You can use node in I/O intensive web applications like video streaming site, real-time web applications, network applications, general-purpose applications, and distributed systems.

Talkspace Full-stack candidate exercise

Guidelines: The following exercise questions should take 1-2 hours, Put your answers after each question - try to give some short explanation for your

Candidate Name: Pery Date: 12/02/2020

@TedSean
TedSean / react-useCallback.md
Created January 6, 2021 13:20 — forked from JamesBliss/react-useCallback.md
Measuring a DOM node

React => measuring a DOM node

Your first instinct will be to use a useRef which can be a good solution, although an object ref doesn’t notify us about changes to the current ref value. This means when the ref.current changes you will not see the updated value.

Solution 1.

Use a callback ref (this example is taken from the react hooks FAQ) This is a super simple and pretty nice solution for one-off measurements.

🔻

NOTE: This page is currently a work in progress. There is a lot to cover in detail. The plan is to breakout details on conventions like 'How To Write Your Selectors' and 'How To Normalize Your Data' a bit later. For now just look for existing examples in the code or ask a friend.

To get the quick and dirty bullet list, scroll down to the TL;DR; below.


React Best Practices & Patterns

There are a few tricks we've picked up since we started that will help us with debugging, reuse, scalability, performance, and common pitfalls of complex singles page app development. We are not code Nazis but getting familiar with these things will help the whole team increase output and reduce code debt. These things should be pointed out in code reviews and corrected.

The goal is to write consistent code with less opportunities for bugs. Complex code is buggy code. It's really that simple.