Font size
WorksheetsIP - LAP3,4&5_SY_25_for_3B
Total questions: 48
Worksheet time: 10mins
What is ReactJS primarily used for?
Server-side programming
Database management
Building user interfaces
Operating system development
Who created ReactJS?
Microsoft
Amazon
What is the key feature of React's DOM manipulation approach?
It directly manipulates the browser's DOM
It creates a virtual DOM in memory
It bypasses DOM manipulation entirely
It uses multiple DOMs simultaneously
What is required to use React in production?
Only a web browser
Python and pip
npm and Node.js
Java Development Kit
What command is used to create a new React application?
npm start-react
react create-new
npx create-react-app
node create-react
What is the recommended action before creating a new React application if you've previously installed create-react-app globally?
Update Node.js
Uninstall create-react-app globally
Clear browser cache
Reset npm configurations
After creating a new React application, which command is used to start it?
react start
start-app
node start
npm start
Where is the main application file located in a React project?
In the src folder as App.js
In the root directory
In the public folder
In the components folder
What type of applications is React commonly used to build?
Mobile applications only
Desktop applications only
Single-page applications
Operating systems
What is DOM in the context of React?
Digital Object Management
Document Object Model
Data Object Manipulation
Directory Object Manager
What is the primary difference between 'var' and 'const' declarations regarding scope in JavaScript?
var has block scope while const has function scope
Both have identical scope rules
const has block scope while var has function scope
Neither has block scope
When using the map() method in React, what is its primary functionality?
It only sorts arrays in ascending order
It creates a copy of the original array without modifications
It executes a function on each array element and returns a new array
It only filters out unwanted elements
In React JSX, why is the className attribute used instead of class?
It's just a styling preference
It provides additional functionality
class is a reserved keyword in JavaScript
It's required for CSS modules
What is the significance of the createRoot() function in React?
It creates a new component
It defines where React components will be rendered in the DOM
It initializes state management
It handles routing
When working with const and objects in React, which statement is true?
The entire object becomes completely immutable
The object reference can't be reassigned, but properties can be modified
Properties can only be read, not modified
The object must remain empty
How must HTML code be structured in JSX?
It can have multiple root elements
It requires exactly two parent elements
It must have one root element or fragment
It can only use div elements
What is the correct syntax for including JavaScript expressions in JSX?
Using [[expression]]
Using {expression}
Using (expression)
Using
What happens to empty elements in JSX?
They are automatically removed
They must be self-closing with />
They can be left open
They require special attributes
How should conditional rendering be handled in JSX?
Using switch statements only
Using while loops
Using if statements outside JSX or ternary operators
Using direct if statements inside JSX
What is the purpose of React Fragments?
To add styling to components
To group elements without adding extra nodes to the DOM
To create reusable components
To handle state management
How does array modification work with const in React?
Arrays cannot be modified at all
Only array length can be changed
Array elements can be modified but not reassigned
Arrays must be converted to let first
What is JSX in React development?
A database query language
A testing framework
A syntax extension allowing HTML in JavaScript
A state management system
When using map() for rendering lists, what is a best practice?
Always sort the items first
Limit the list to 10 items
Provide a unique key prop for each item
Use indexes as keys always
How does the render method work in React?
It only handles CSS rendering
It defines which components to display in the DOM
It's used for data fetching
It only manages state updates
What is the correct way to write multi-line HTML in JSX?
Using semicolons between lines
Wrapping it in parentheses
Using line continuation characters
Adding commas between elements
How does variable scoping work with let in React?
It has global scope only
It has block scope
It has function scope only
It has no scope restrictions
What is the relationship between JSX and JavaScript?
They are completely separate languages
JSX compiles to regular JavaScript
JSX only works with TypeScript
They cannot be used together
How should large blocks of conditional content be handled in React?
Always using switch statements
Using multiple render methods
Using logical operators or separate components
Only using inline ternary operators
What is the primary purpose of ES6 destructuring in React?
To create new objects
To combine multiple arrays
To extract values from objects and arrays efficiently
To modify object properties
How does the root node concept work in React applications?
Multiple root nodes are required
The root node serves as the main container for React-managed content
Root nodes cannot be customized
Root nodes must be created dynamically
______ are independent and reusable bits of code. They serve the same purpose as JavaScript functions but work in isolation and return HTML.
React Functions
React Components
React Usable Codes
React JSX
______ are like arguments, and you send them into the component as attributes.
React Functions
React Components
Properties
State
What time of component is this?
Function Component
Class Component
What time of component is this?
Function Component
Class Component
This type of function will be called when the component gets initiated.
constructor()
super()
component()
state()
Give the result.
(Careful of spaces)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
Give the result.
(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)
(a)
