0. We can also have a dynamic value in the source code. For example,
new Date() will return the current time object at runtime.
But can we get a value specifically for compile-time processing (e.g. we want to display a timestamp when this version of code is compiled)?
Yes, we can.
preval.macro is perfect for this kind of task.
new Date() at compile time and swap the generated value into a specific location of the source code.
babel-plugin-macros: Defines a standard interface for libraries to use compile-time code transformation.
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.