In this article, we’ll look into four of the most important new features. We’ll cover a new string method, a new Promise method, improvements to number readability, and a new shorthand for assignments.
First, we have a new string prototype method,
replaceAll, which replaces every instance of a substring. While we could do this with the existing replace method, we had to turn to regular expressions, such as the following:
replaceAll is arguably more readable:
replaceAll, no regex is necessary. It can still be used, though, as long as the
g flag is provided.
Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.
For working with any tech you must know the lifecycle. When writing React components, we need access to lifecycle events to handle a variety of side effects: like fetching data on mount, changing props when the component updates, cleaning up before the component unmounts, etc.