Untitled Deck Flashcards

1
Q

What is Single Page Applications (SPA)?

A

Single Page Applications (SPA) are web applications that load a single HTML page and dynamically update content as the user interacts with the app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the phases of a React component lifecycle?

A

The phases of a React component lifecycle are Mounting, Updating, and Unmounting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are important CSS properties while creating animations?

A

Important CSS properties for animations include ‘transition’, ‘animation’, ‘keyframes’, and ‘transform’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give an example of passing parameters to event handlers in React.

A

An example is: <button onClick={(e) => this.handleClick(e, param)}>Click Me</button>.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do state and props differ in React?

A

State is managed within the component, while props are passed from parent to child components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does JSX render elements differently than traditional JavaScript?

A

JSX allows you to write HTML-like syntax directly in JavaScript, which is then transformed into React elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name a few React Bootstrap components.

A

React Bootstrap components include Button, Modal, Alert, and Navbar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are transitions in CSS, and how are they implemented in React?

A

Transitions in CSS allow property changes in CSS values to occur smoothly over a specified duration. In React, they can be implemented using CSS classes or libraries like React Transition Group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is inline styling in React, and what are its limitations?

A

Inline styling in React is done using the ‘style’ attribute with a JavaScript object. Limitations include lack of pseudo-classes and media queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is the Context API preferred over prop drilling in React?

A

The Context API is preferred because it allows for easier state management and avoids the need to pass props through many layers of components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain template literals in ES6.

A

Template literals are string literals that allow embedded expressions, using backticks (``) and ${expression} syntax.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain destructuring in JS.

A

Destructuring is a syntax that allows unpacking values from arrays or properties from objects into distinct variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do arrow functions differ from traditional functions in JavaScript?

A

Arrow functions do not have their own ‘this’ context and are syntactically shorter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the purpose of CSS grid in building React layouts.

A

CSS grid provides a two-dimensional layout system that allows for complex responsive designs in React applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does let differ from var in JavaScript?

A

The ‘let’ keyword has block scope, while ‘var’ has function scope.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do arrow functions improve code readability in React?

A

Arrow functions provide a concise syntax and maintain the context of ‘this’, enhancing readability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How is async/await implemented in JavaScript?

A

Async/await is implemented using the ‘async’ keyword before a function and ‘await’ before a promise, allowing for asynchronous code to be written in a synchronous style.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How is CSS flexbox used in React layouts?

A

CSS flexbox is used to create flexible and responsive layouts by defining the direction and alignment of items in a container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are ES6 features that improve React code?

A

ES6 features that improve React code include arrow functions, destructuring, template literals, and modules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

List the types of input elements in HTML5 used for better user experience.

A

Types include text, email, password, date, number, range, and checkbox.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the benefits of using promises over callbacks?

A

Promises provide a cleaner syntax, better error handling, and avoid callback hell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are CSS modules, and how do they prevent naming conflicts in React?

A

CSS modules are a way to scope CSS by automatically generating unique class names, preventing naming conflicts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is destructuring, and how is it applied in React?

A

Destructuring allows extracting values from arrays or properties from objects, commonly used in React for props and state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the differences between React Bootstrap and traditional Bootstrap?

A

React Bootstrap is built specifically for React, using components instead of jQuery, while traditional Bootstrap relies on jQuery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is the role of const in React development?

A

The ‘const’ keyword is used to declare variables that should not be reassigned, promoting immutability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is the role of CSS media queries in responsive design?

A

CSS media queries allow styles to be applied based on the viewport size, enabling responsive design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is the significance of promises in JavaScript?

A

Promises represent the eventual completion (or failure) of an asynchronous operation and its resulting value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is the use of async/await in React?

A

Async/await is used in React for handling asynchronous operations, such as data fetching, in a more readable way.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Why is ES6 important for React development?

A

ES6 introduces features that enhance code readability, maintainability, and efficiency in React development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Describe the significance of package.json in a React app.

A

The package.json file manages project dependencies, scripts, and metadata for a React application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

How do flexbox layouts differ from grid layouts in React?

A

Flexbox is one-dimensional, focusing on either rows or columns, while grid is two-dimensional, allowing for complex layouts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

How is a React app file structure organized?

A

A typical React app file structure includes folders for components, assets, styles, and tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

How is data fetched asynchronously using async/await?

A

Data is fetched by defining an async function, using ‘await’ before the fetch call to wait for the response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What are caching strategies for better performance in PWAs?

A

Caching strategies include cache-first, network-first, and stale-while-revalidate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are common use cases for Context API in React?

A

Common use cases include theme management, user authentication, and global state management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What are the benefits of using Redux for state management?

A

Redux provides a predictable state container, centralized state management, and easier debugging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What is the purpose of the public folder in React?

A

The public folder contains static assets that can be served directly, such as index.html and images.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What is the role of media queries in responsive web design?

A

Media queries allow developers to apply different styles based on device characteristics, enhancing responsiveness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What is the role of the src folder in a React project?

A

The src folder contains the source code for the React application, including components and styles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Compare functional components to class components in React.

A

Functional components are simpler and often use hooks, while class components have lifecycle methods and state management.

41
Q

Explain how useEffect can manage side effects in React.

A

The useEffect hook allows you to perform side effects in function components, such as data fetching and subscriptions.

42
Q

How are click events handled in React?

A

Click events are handled using the onClick prop, which takes a function to execute on click.

43
Q

How are hooks used to manage state in functional components?

A

Hooks like useState allow functional components to manage state without converting to class components.

44
Q

What is the difference between HTTP and HTTPS?

A

HTTPS is the secure version of HTTP, using encryption to protect data during transmission.

45
Q

Name Redux’s core principles for state management.

A

Core principles include a single source of truth, state is read-only, and changes are made with pure functions.

46
Q

Provide an example of useEffect for fetching data in React.

A

Example: useEffect(() => { fetch(url).then(response => response.json()).then(data => setData(data)); }, [url]);

47
Q

What are the benefits of using functional components in React?

A

Benefits include simpler syntax, easier testing, and the ability to use hooks for state and lifecycle management.

48
Q

What is the purpose of Redux in React?

A

Redux is used for state management, providing a predictable state container for React applications.

49
Q

What is the useState hook in React?

A

The useState hook is a function that allows you to add state to functional components.

50
Q

When would you use Context API in React?

A

Use Context API when you need to pass data through many layers of components without prop drilling.

51
Q

Compare PWA installation with traditional mobile apps.

A

PWAs can be installed directly from the browser without an app store, while traditional apps require installation from app stores.

52
Q

How can a PWA be installed on a user’s device?

A

A PWA can be installed by visiting the website and selecting ‘Add to Home Screen’ in the browser.

53
Q

How can caching strategies enhance PWAs?

A

Caching strategies enhance PWAs by allowing offline access and faster load times.

54
Q

How do service workers enable offline functionality?

A

Service workers intercept network requests and serve cached resources when the network is unavailable.

55
Q

Provide an example of caching strategies in a PWA.

A

An example is using a cache-first strategy to serve cached content before attempting to fetch from the network.

56
Q

What are the key characteristics of a PWA?

A

Key characteristics include being reliable, fast, and engaging, with offline capabilities and responsive design.

57
Q

What is a web app manifest?

A

A web app manifest is a JSON file that provides metadata about the web application, such as name, icons, and start URL.

58
Q

What is the role of service workers in PWAs?

A

Service workers act as a proxy between the web app and the network, enabling offline capabilities and caching.

59
Q

What technologies enable offline capabilities in PWAs?

A

Technologies include service workers, caching, and the web app manifest.

60
Q

Why is a web app manifest important for PWAs?

A

The web app manifest allows users to install the PWA on their devices and provides a native app-like experience.

61
Q

How are PWAs different from traditional web applications?

A

PWAs offer offline functionality, can be installed on devices, and provide a more app-like user experience.

62
Q

What is the purpose of a service worker?

A

A service worker acts as a script that runs in the background and manages caching and network requests.

63
Q

How can you secure React apps using SSL certificates?

A

You can secure React apps by obtaining and installing SSL certificates to enable HTTPS.

64
Q

Explain the architecture of push notifications in React.

A

Push notifications in React involve a service worker, a push service, and the client application to receive messages.

65
Q

How do CDNs mitigate DDoS attacks in React apps?

A

CDNs distribute traffic across multiple servers, reducing the load on the origin server and mitigating DDoS attacks.

66
Q

How do JWTs work in web applications?

A

JWTs (JSON Web Tokens) are used for securely transmitting information between parties as a JSON object.

67
Q

How does React impact SEO compared to server-rendered websites?

A

React can impact SEO negatively if not server-rendered, as search engines may struggle to index client-rendered content.

68
Q

Name protocols that ensure secure communication in React apps.

A

Protocols include HTTPS, SSL/TLS, and WebSocket Secure (WSS).

69
Q

What are the client-side and server-side roles in push notifications?

A

The client-side registers for notifications and displays them, while the server-side sends the notifications.

70
Q

What is OAuth 2.0, and how does it support user authentication?

A

OAuth 2.0 is an authorization framework that allows third-party services to exchange information without sharing credentials.

71
Q

What is the importance of HTTPS in a React application?

A

HTTPS ensures secure communication, protecting user data and improving trust in the application.

72
Q

What is the process of obtaining an SSL certificate for production apps?

A

The process involves generating a CSR, submitting it to a certificate authority, and installing the certificate on the server.

73
Q

Why is it necessary to redirect HTTP traffic to HTTPS?

A

Redirecting HTTP to HTTPS ensures all traffic is secure and protects user data from interception.

74
Q

What is the importance of APIs in modern web development?

A

APIs enable communication between different software systems, allowing for integration and data exchange.

75
Q

Describe Web Speech API and its use in web applications.

A

Web Speech API provides speech recognition and synthesis capabilities, allowing for voice interactions in web applications.

76
Q

How are 360-degree videos relevant to VR?

A

360-degree videos provide immersive experiences in virtual reality, allowing users to explore environments.

77
Q

How do ARIA roles improve accessibility in React apps?

A

ARIA roles provide additional semantic information to assistive technologies, improving accessibility for users with disabilities.

78
Q

How does Virtual Reality (VR) differ from Augmented Reality (AR)?

A

VR immerses users in a completely virtual environment, while AR overlays digital content onto the real world.

79
Q

Name four WCAG principles for accessibility in React.

A

The four principles are Perceivable, Operable, Understandable, and Robust.

80
Q

Name libraries used for 3D graphics in React.

A

Libraries include Three.js, React Three Fiber, and Babylon.js.

81
Q

What are the differences between marker-based and markerless AR?

A

Marker-based AR uses physical markers to trigger digital content, while markerless AR uses GPS and sensors for placement.

82
Q

What is the benefit of WebXR for immersive web experiences?

A

WebXR provides APIs for creating immersive experiences in virtual and augmented reality directly in web browsers.

83
Q

What is the significance of voice-based interactions for accessibility?

A

Voice-based interactions enhance accessibility by allowing users with disabilities to navigate and interact with applications.

84
Q

Why are APIs important in AR/VR development?

A

APIs facilitate integration with hardware and software, enabling the development of immersive AR/VR experiences.

85
Q

Explain how machine learning is used in React for recommendation systems.

A

Machine learning algorithms analyze user behavior to provide personalized recommendations within React applications.

86
Q

How are WebSockets used in AR/VR for real-time communication?

A

WebSockets enable real-time, bidirectional communication between clients and servers, essential for interactive AR/VR experiences.

87
Q

How does Semantic Web differ from the Traditional Web?

A

The Semantic Web aims to make data machine-readable, allowing for better data integration and interoperability.

88
Q

How does WebXR improve VR experiences on the web?

A

WebXR provides standardized APIs for creating immersive VR experiences that work across different devices and platforms.

89
Q

How is WebGL related to creating 3D graphics?

A

WebGL is a JavaScript API that allows rendering 3D graphics in web browsers without the use of plugins.

90
Q

Provide an example of CSS code to create a 3D cube.

A

Example:

```css
.cube {
width: 100px;
height: 100px;
transform-style: preserve-3d;
}
~~~

91
Q

What are the advantages of using ARIA roles in React?

A

ARIA roles enhance accessibility by providing semantic meaning to elements, improving navigation for assistive technologies.

92
Q

What are the steps to integrate a machine learning model in React?

A

Steps include training the model, exporting it, and using a library like TensorFlow.js to integrate it into the React app.

93
Q

What is a ‘meta-framework,’ and how does it benefit modern web development?

A

A meta-framework is a framework built on top of other frameworks, providing additional features and simplifying development.

94
Q

What is the role of 3D elements in enhancing web user experience?

A

3D elements create immersive and engaging experiences, making web applications more interactive and visually appealing.

95
Q

How do DDoS attacks affect JavaScript-based applications?

A

DDoS attacks overwhelm the server with traffic, causing slowdowns or outages for JavaScript-based applications.

96
Q

Name strategies for mitigating DDoS attacks on React apps.

A

Strategies include rate limiting, using CDNs, and implementing Web Application Firewalls (WAFs).

97
Q

What is marker based AR?

A

Marker-based AR uses physical markers to trigger the display of digital content when viewed through a device.

98
Q

What is VR? Tell any two applications.

A

Virtual Reality (VR) is an immersive experience that simulates a real or imagined environment. Applications include gaming and training simulations.

99
Q

Which is better native mobile app or PWA with respect to speed?

A

Native mobile apps generally offer better speed and performance due to direct access to device hardware compared to PWAs.