Frameworks Quiz - Languages JavaScript
Free practice quiz: Frameworks (Languages JavaScript). 52 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
This Languages JavaScript practice quiz has 52 multiple-choice questions on Frameworks, and 52 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.
Start quiz: 52 questions, freeSample questions
Which of the following is a client-side JavaScript framework primarily used for building user interfaces?
Show answer
Answer: B. React
React is a popular JavaScript library (often referred to as a framework) for building user interfaces, primarily focused on the view layer of an application. Node.js and Express.js are backend technologies, and AngularJS (the older version) is also a client-side framework but React has a different architectural approach.
Which of the following is a characteristic of Svelte?
Show answer
Answer: B. It compiles components into highly efficient imperative JavaScript code at build time.
Svelte is a compiler. Instead of using a virtual DOM or shipping a runtime library, Svelte compiles your components into small, vanilla JavaScript modules that efficiently update the DOM when state changes.
Which React lifecycle method is invoked immediately after a component's updates are flushed to the DOM?
Show answer
Answer: C. componentDidUpdate
`componentDidUpdate()` is called after the component updates and the changes have been rendered to the DOM. `getSnapshotBeforeUpdate()` is called before the DOM changes.
Which of the following is a meta-framework built on top of React, providing features like SSR, SSG, and API routes?
Show answer
Answer: C. Next.js
Next.js is a popular React framework that enables Server-Side Rendering (SSR) and Static Site Generation (SSG) for server-rendered React applications, as well as API routes for building backends.
What is the purpose of `React.memo`?
Show answer
Answer: B. To memoize a functional component, preventing re-renders if its props have not changed.
`React.memo` is a higher-order component that memoizes a functional component. It performs a shallow comparison of the component's props. If the props are the same, React skips re-rendering the component and reuses the last rendered result.
More questions in this quiz
Answers and explanations are in the full quiz.
- In the context of React, what is JSX?
- What is the primary purpose of Vue.js?
- Which of the following is a characteristic of Angular (version 2+)?
- What is the role of a 'Virtual DOM' in frameworks like React?
- Which concept in React allows for code reusability and logic sharing between components without direct inheritance?
- In Vue.js, what is the purpose of the `v-model` directive?
- Which Angular concept is used to encapsulate logic and template for a specific part of the UI?
- What is a 'state' in the context of a front-end framework like React or Vue.js?
- What is 'server-side rendering' (SSR) in the context of JavaScript frameworks?
- What is the purpose of 'props' in React?
- Which of the following is a common state management library used with React?
- In Angular, what is a 'Service' typically used for?
- What is 'hydration' in the context of SSR frameworks like Next.js?
- Which of the following is a core concept in Vue.js for making data reactive?
- What does 'Single-Page Application' (SPA) typically refer to in web development frameworks?
- Which React hook is used to manage state within functional components?
- In Angular, what is the purpose of a 'Directive'?
- What is 'create-react-app'?
- What is the primary advantage of using a framework like Nuxt.js over plain React for building web applications?
- In Vue.js, what is the `watch` property used for?
- What is a 'prop drilling' issue in React, and how can it be mitigated?
- Which of the following is a key feature of the Ember.js framework?
- What is the purpose of `useCallback` hook in React?
- In Angular, what is the purpose of an 'NgModule'?
- What is 'code splitting' in the context of JavaScript frameworks?
- Which of the following is a feature of Preact, a lightweight alternative to React?
- What is the role of `useEffect` hook in React?
- In Angular, what is a 'Pipe' used for?
- What is the primary purpose of the `key` prop when rendering lists of elements in React?
- Which Angular decorator is used to define a class as a component?
- What is the role of a 'router' in a JavaScript framework like React Router or Vue Router?
- What is the primary benefit of using `useMemo` hook in React?
- Which of the following is a characteristic of the Alpine.js framework?
- What is 'props drilling' in React?
- In Vue.js, what is the purpose of the `computed` property?
- What is the primary function of the `ref` hook in React?
- Which of the following is a core concept in Angular for handling asynchronous operations and event streams?
- Which of the following describes a 'progressive web app' (PWA)?
- What is the main purpose of the `useContext` hook in React?
- In Angular, what is the purpose of the `HttpClient` module?
- What is 'state management' in the context of front-end frameworks?
- Which of the following is a core tenet of the Redux library for state management?
- What is the purpose of 'client-side routing' in frameworks like React Router?
- Which framework is known for its focus on developer experience and providing a batteries-included ecosystem, often referred to as 'the framework with convention over configuration'?
- What is the purpose of the `useReducer` hook in React?
- In Vue.js, what is the purpose of a 'Lifecycle Hook'?
- What is the primary advantage of using a framework like Astro?