본문 바로가기

Action/Path to Cowcowwow

[참고 자료] Imperative vs Declarative Programming

반응형

The code above is a good example of imperative programming. You’re writing the steps for how the user interface should be updated. But when it comes to building user interfaces, a declarative approach is often preferred because it can speed up the development process. Instead of having to write DOM methods, it would be helpful if developers were able to declare what they want to show (in this case, an h1 tag with some text).
In other words, imperative programming is like giving a chef step-by-step instructions on how to make a pizza. Declarative programming is like ordering a pizza without being concerned about the steps it takes to make the pizza. 🍕

(출처 : Nextjs 튜토리얼)

반응형