Memo: Web performance runtime Q&A
Sometimes, we might have to update a variable or a function name that is being used widely in your large project. And unluckily that the existing name is very common and being used for other stuff as well.
Using a common feature like Find all and replace to search the actual text might not be effective because you might update the wrong one. So, we have to check it one by one whether we can update it or not.
Which way is easiest for this case?
The VSCode provides us a very useful feature to solve this kind of issue. It is a Find All References feature.
Let's say, we need to update this type name from Article to ArticleItem
Then, we have to select the type name and right click > Find All References
After that, we will see all current references of Article type and we can update it easily
By doing this, we can make sure that we are updating the correct items
This feature works best against modern JS that uses import/export