The declarative API
The most frequent explanation for the distinction between imperative and declarative programming is that imperative code instructs the computer on how to perform tasks, whereas declarative code concentrates on what you want the computer to do.
Your code in imperative programming is made up of statements that affect the program's state by instructing the computer what to do. To put it another way, your code is built around defining variables and altering their values.
Your code in declarative programming is made up of expressions that evaluate their output based on their input by telling the machine what you want.
React was designed following the declarative paradigm, although it allows you to control some components the imperative way when needed. So does lottie-react-native
as it provides different APIs for imperative or declarative control on the animations rendered within an app.
In this section, we will focus on how to control the example animated...