Quiz Space

Modern Application Development II · End Term · 21 Dec 2025 · September 2025 term

Question 29: Consider the following Vue.js application with two diffe…

Question 29

+4 marksOne correct option

Consider the following Vue.js application with two different route scenarios and a component that uses reactive data binding:
Scenario: An e-commerce application where:
• Product list component displays products filtered by category
• Category changes through router parameters: /products/:category
• When a user navigates from /products/electronics to /products/books, the product list should update

Based on the above data, answer the given subquestions.

When the user navigates from /products/electronics to /products/books, what will happen and why?

  1. A

    The computed property will not update because it's being used in a watch handler

  2. B

    The computed property will automatically re-evaluate because the route parameter dependency changed

  3. C

    The displayedProducts variable will update, but the computed property will display stale data

  4. D

    Both the computed property and displayedProducts will update to show books

Show answer

Correct answer

  • B

    The computed property will automatically re-evaluate because the route parameter dependency changed

Question 29 of 29 in the IIT Madras BS Modern Application Development II (MAD 2) End Term paper sat on 21 Dec 2025, in the September 2025 term (Modern Application Development Ii 18 Dec 25). It carries 4 marks.

More questions from this paper

  1. Q1Considering the following code snippet, which statements are true about components in Vue?
  2. Q2Consider the following JavaScript code snippet. What will be printed on the console?
  3. Q3Which of the following is considered a good practice for securing user authentication in a web application?
  4. Q4In the following code snippet, which values should replace option1 and option2 so that the cookie is sent only over HTT…
  5. Q5When comparing Redis with a typical API data store (like a relational database accessed through REST APIs), which of th…
  6. Q6How can you stop a Cross-Site Scripting (XSS) attack?
  7. Q7Which of the following describe Redis features correctly?
  8. Q8Which of the following is true about Vuex state?
  9. Q9What is the purpose of Redis in a Celery-based system?
  10. Q10What happens to the fetch call when it gets a 404 status code (page not found)?
  11. Q11Consider the following JavaScript snippet. What will be printed on the browser's console?
  12. Q12Consider the following JavaScript snippet: What will be printed on the browsers' console?
  13. Q13Consider the following Vue Router setup and HTML. Suppose the webpage is served at http://127.0.0.1:5000. A user visits…
  14. Q14Consider the following JavaScript code snippet where a web application manages user preferences using localStorage. A u…
  15. Q15A developer creates a Vue component using both v-if and v-show directives on different elements with initially false co…
  16. Q16A Promise chain is created as follows. The first Promise resolves with a string, which is then processed through multip…
  17. Q17A JavaScript object is created and then assigned to another variable. Modifications are made through both variables. Wh…
  18. Q18Which of the following statements about the "this" keyword in JavaScript are correct?
  19. Q19A Vue Router application uses lazy-loaded route components. When a user navigates to a route with a dynamic parameter (…
  20. Q20A developer uses sessionStorage to store authentication tokens in a web application. The user logs in, the token is sto…
  21. Q21A developer creates a Vue component with prototype chain inspection. The component uses class-based inheritance with li…
  22. Q22In a web application using webhooks and Redis for real-time data synchronization:\ Scenario: An order management system…
  23. Q23Consider the Vue application. Based on the above data, answer the given subquestions. What happens when the user clicks…
  24. Q24Consider the Vue application. Based on the above data, answer the given subquestions. Under which condition will the co…
  25. Q25Consider the Vue application. Based on the above data, answer the given subquestions. What are the benefits of computed…
  26. Q26Consider the following Vue 2 (CDN) code. html code: script: Based on the above data, answer the given subquestions. Wha…
  27. Q27Consider the following Vue 2 (CDN) code. html code: script: Based on the above data, answer the given subquestions. Why…
  28. Q28Consider the following Vue.js application with two different route scenarios and a component that uses reactive data bi…