본문 바로가기
320x100
320x100
  • Imperative: Give step-by-step instructions on how to reach a certain goal
  • Declarative: Describing the result (the what), without instructing how to do it

예시)

Mom wants a kid to tidy up its room.

  • Imperative: “Pick up the toys, then empty the bin, then remove dust and finally vacuum the floor.”
  • Declarative: “Here’s a picture of how your room looks like clean. I want you to get it into that state in 30 minutes.”

 

선언적 렌더링?

DOM 엘리먼트에게 다시 렌더링할 것을 명령하지 않고 DOM과 연결된 상태와 속성이 변경될 때 자동으로 DOM 엘리먼트가 업데이트되는 것을 의미

 

  • 선언적 렌더링을 사용하는 Framework(Library)
    1. Vue
    2. React
  • 명령형 렌더링을 사용하는 Framework(Library)
    1. jQuery
    2. Angular

 

참고

https://www.explainprogramming.com/theory/imperative-declarative-react/

 

Imperative vs. declarative rendering of user interfaces

What do the terms imperative and declarative mean in the context of creating interactive user interfaces in React and React Native (in contrast to jQuery)?

www.explainprogramming.com

https://dev.to/this-is-angular/wrapping-imperative-apis-in-angular-550b

 

Wrapping Imperative APIs in Angular

Easily guaranteeing consistency by wrapping imperative APIs in Angular.

dev.to

 

320x100

댓글