Showing Alert For Page Refresh , Closing tab or Window If Unsaved changes are there in the Form – ReactJS

If unsaved changes are there in the form, we will use the following code to show default alert message when user tries to reload or close the window or close the tab.

How to find outdated packages/libraries in the project – ReactJS ?

To find outdated packages / libraries in a project we need to run the following command if we are using npm + package-lock.json

If our project uses yarn + yarn.lock, then we need to run the following command to find outdated packages / libraries in a project.