Value Types vs Reference types in JavaScript Explained
Posted on January 17, 2021When 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 postHow to setup LESS with React without Ejecting
Posted on January 10, 2021SASS 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 postCreating Reusable Components with useMemo
Posted on January 04, 2021Today 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