author-pic

JOSEPH CHOW

Value Types vs Reference types in JavaScript Explained

Posted on January 17, 2021

When storing a variable in JavaScript, the JavaScript engine may store it as one of two types of values: a primitive or reference value. Understanding the difference in how they behave will help to avoid mistakes while manipulating them. An Example Instead of jumping straight into a boring explaination, consider this script: We may expect the output to be…

Read full post

How to setup LESS with React without Ejecting

Posted on January 10, 2021

SASS has been natively supported since React 16.7 with a single additional package node-sass. It can be easily integrated simply by adding node-sass and importing your pre-processed stylesheet. However, there is not such an easy solution to handle compiling LESS stylesheets. This is problematic because to manually configure webpack to compile our LESS…

Read full post

Creating Reusable Components with useMemo

Posted on January 04, 2021

Today we will looking at a principle of creating resilient components in React and creating a useful custom hook with the useMemo hook. Sometimes when creating a component, we can assume that it will only be used once. However, that assumption may lead into problems sharing props when reusing a simple component. In our example here today, we will look at…

Read full post