Skip to content

Instantly share code, notes, and snippets.

@hectorlorenzo
hectorlorenzo / aocd3.js
Created December 4, 2017 14:47
Solution to Advent of Code 3
function sum (x) {
var sum = 0;
while(x > 0) {
sum = sum + x;
x--;
}
return sum;
}
@hectorlorenzo
hectorlorenzo / Main.md
Last active November 13, 2020 11:09
Learning React when coming from Vue

Learning React the Vue way

componentDidMount

Part of the component lifecycle, similar to created/mounted.

componentWillUnmount

Part of the component lifecycle, similar to destroyed