vvlnote.github.io


What I know about JavaScript Closure - part I

Recently, I am trying to work on the google map, to have google map display in my project. I used react-google-maps package. By reading the spec of react-google-maps, there is a term “HOC”. It stands for Higher-Order Component. and the concept of it is derived from “HOF”, it stands for Higher-Order Function. I have heard this term before, and I would like to know what is it.


npm -i or yarn -add

Since I am continuing on learning new things about web development, I look up so many tech docs about new package, and new way to implmenet the Web app. Recently, I was trying to download the packages for my side project. I saw some engineers use npm -i to download and install the needed packag, however, I saw a lots of engineer using yarn add to install the package. I am curious what are the difference between these two.


React Router - Part II

There are several ways to redirect to other page in programmatic way.


React Router - Part I (Basic)

The reason I need to div into react route is because I need to route to the pages after user login/register, and all the pages after register/login only displayed the information relating to the logined users. So I need to have a router and find a way to job into the particulare starting pages to handle this kind of scenario.


Axios or Fetch

Axios is a Javascript library used to make http requests from node.js, and it supports the Promise API. Another feature that it has over .fetch() is that it performs automatic transoforms of JSON data.