Difference between declarative and imperative in React.js?

后端 未结 9 541
日久生厌
日久生厌 2020-11-30 17:29

Recently I\'ve been studying a lot about the functionality and the ways to use the Facebook JavaScript library React.js. When speaking of its differences to the rest of the

9条回答
  •  猫巷女王i
    2020-11-30 17:43

    This is great analogy:

    *An imperative response: Go out of the north exit of the parking lot and take a left. Get on I-15 south until you get to the Bangerter Highway exit. Take a right off the exit like you’re going to Ikea. Go straight and take a right at the first light. Continue through the next light then take your next left. My house is #298.

    A declarative response: My address is 298 West Immutable Alley, Draper Utah 84020*

    https://tylermcginnis.com/imperative-vs-declarative-programming/

提交回复
热议问题