CRA or create-react-app helps to create a react app with just a single command. It has a package called react-scripts
that can run an app in dev mode, run tests or build the app for production. It is quite useful for demos, prototypes and internal apps. But I still don’t like it as much. Here are the top 3 reasons why I still don’t like it in the year 2021!…
Tag: Opinion
When we have multiple projects using similar code, there is an urge to publish them as NPM packages. Should we publish them as public NPM packages or private NPM packages which can be used only within our enterprise? Or when should we avoid publishing a NPM package?
Let’s assume we have this question for UI projects. Most UI projects run on the browser.…
React 16 has a forwardRef function. The function creates a new component with its ref attached to one of the child component. Why is this a big deal? In React, key and ref are special props which are not part of this.props
within the component. I will explain this with a little bit of code.
Consider we have a component for entering SSN.…
Async / await in JavaScript makes async programming look synchronous. The code for importing a row of data using async / await pattern looks like below.
async function validateAndImportRow(row) { const isValid = await validateRow(row); if (isValid) { await import(row); } return isValid; }
I am a late adopter of almost everything. For example, it was not until 2003 when I got my first mobile phone.…