Saturday, September 16, 2023

Declarative Vs Imperative

 React uses a declarative approach for making programs, for example, in an imperative flow, we tell the computer exactly how to manipulate the DOM (Document Object Model) 

[ Also look at, what is a DOM?] 

We specify where the control flow needs to go and exactly how we want to manipulate the screen

In a declarative approach, we do the opposite, where there is a lot more abstraction and we just tell the computer "I want to create a button" and it creates a button and does not bother us with too much low lying information


[add more...]

No comments:

Post a Comment

How to inspect hard to get elements

 Today I learned how to inspect hard to get elements in the DOM using a CSS trick in the console.  So what you basically do is that you go i...