React MCQ
- ReactJS is a JavaScript library originally developed by Facebook.
- it helps in building highly engaging single-page web apps.
- react JS helps in breaking down the complex into simpler components.
- NPX: It is an npm package that is expected to be done only once in a project.
- Folder structure:
- Readme.md: it is used to generate an HTML summary.
- .gitignore: files that you do not want to push in GitHub.
- public/index.html: HTML file of our react app. This is the page that will be loaded on starting the application.
- src/index.js: JS File corresponding to index.html file.
- src/app.js: The main component of any react app. it acts as a container for all other components.
- src/ app.css : Hills in injection styling in react app
- JSX: it allows to write HTML in JavaScript and place them in DOM without any child() or createElement() method.
- Components in react:
- they are nothing but reusable JavaScript function
- even if the component does not depend on each other, they merge inside a parent component to produce the final UI.
- Benefits:
- allows reusability of code
- makes it easier to find a tailor
React MCQs
Which of the following is used in React.js to increase performance?
What is ReactJS?
Identify the one which is used to pass data to components from outside
Who created React.js?
In which language is React.js written?
What is Babel?
Identify the command used to create a react app.
Which of the following port is the default where webpack-dev-server runs?
How many elements can a valid react component return?
A state in React.js is also known as?
Which of the following method is used to access the state of a component from inside of a member function?
State whether true or false: Props are methods into other components?
What are arbitrary inputs of components in react also known as?
In MVC, what does React.js act as?
State whether true or false: React.js covers only the view layer of the app.
Among The following options, choose the one which helps react for keeping their data uni-directional?
Using which of the following command can prevent default behaviour at in react?
Identify the smallest building block of React.JS.
What is ReactJS mainly used for building?
Which of the following function is used to change the state of react component?
Among the following which acts as the input of class-based component?
Among the following which is used to create a class inheritance?
Choose the correct data flow sequence of flux concept.
Total ways of defining variables in ES6 is?
Which of the following are two ways to handle data in react?
Among the corner which is a must-have for every ReactJS component?
ES6 stands for _________
Choose the method with refers to the parent class in ReactJS?
JSX stands for __________
The function which is called to render HTML to a web page in react?
Choose the functionality of setState?
Choose the method which is not a part of ReactDOM?
Choose the correct statement in the context of uncontrolled components in ReactJS?
In which directory is react component saved?
What is the functionality of a “webpack” command?
State whether true or false: React merges the objects you provide into the current state using setState().
State whether true or false: React creates virtual DOM in memory.
In react, the key should be?
Which company developed ReactJS?
Choose the component which should be overridden to stop the component from updating?
Which of the following is used to access a function fetch() from h1 element in JSX?
When setState() is called inside render() method, which of the following events takes place?
What happens if you render an input element with disabled = {false}?
When is useReducer used over useState in React component?
React is a ___________
Choose the library which is most often associated with react?
What is used to handle code-splitting?
Why is useLayoutEffect used?
Which of the following terms commonly described react applications?
Why is ref used?