REACT Practice Test
Which of the following React functions will update the data of a component while remaining within the componentWillMount?
Explanation:
setState is the API method provided with the library so that the user is able to define and manipulate state over time.
React may batch multiple setState () calls into a single update for performance. Because this.props and this.state may
be updated asynchronously, you should not rely on their values for calculating the next state.
What does React not include?
Explanation:
The correct answer is All of the above
Which step should be completed first when configuring Gulp on a developer machine?
Explanation:
Gulp is a task runner that uses Node.js as a platform. Gulp purely uses the JavaScript code and helps to run front-end
tasks and large-scale web applications. It builds system automated tasks like CSS and HTML minification, concatenating
library files, and compiling the SASS files. These tasks can be run using Shell or Bash scripts on the command line.
Which JavaScript API may be used to delete an item from a Flux store's private storage?
Explanation:
Lodash is a JavaScript library which provides utility functions for common programming tasks using the
functional programming paradigm.
For type verification in React components, what property name is used?
Explanation:
PropTypes. PropTypes ensure that the right type of props is passed to a component — and, conversely, that the
receiving component is receiving the right type of props.
In the following code segment, select the reason for adding code to the index.js file - S = jQuery= require("jquery");
Explanation:
The correct answer is Bootstrap expects 'jQuery to be in a global space
Prepopulate a form in a React form component using which component lifecycle method
Explanation:
The componentDidMount () method is called after the component is rendered. This is where you run statements
that requires that the component is already placed in the DOM. At first my favorite color is red, but give me a second,
and it is yellow instead: The next phase in the lifecycle is when a component is updated.
What isn't a Browserify advantage?
Explanation:
The correct answer is Increases HTTP requests to get JS modules
Choose a programming language that isn't used in the ESLintrc file.
Explanation:
The correct answer is C
What distinguishes the React Router?
Explanation:
The correct answer is All of the above
Which sentence allows a tag named 'InputComp' to use a React reusable text input component found in the file 'TextlnputComp.jsx'?
Explanation:
The correct answer is var InputComp = require(‘../ TextlnputComp.jsx');
What is modified when an action is added to edit a component's data?
Explanation:
The correct answer is Store.jsx, the component store
The rendering of JSX tiles needs
Explanation:
ReactDOM is a package that provides DOM specific methods that can be used at the top level of a web app to
enable an efficient way of managing DOM elements of the web page. ReactDOM provides the developers with
an API containing the following methods and a few more.
Which React function will display child components of a given component?
Explanation:
Essentially, props.children is a special prop, automatically passed to every component, that can be used to RENDER
the content included between the opening and closing tags when invoking a component. These kinds of components
are identified by the official documentation as “boxes”.
In React, which store function is not used to configure the change listener?
Explanation:
Correct answer is None of the above
What distinguishes the virtual DOM?
Explanation:
Correct answer is JavaScript objects update faster
When added to a component's style, it determines the layout's primary axis, and when using React's flexbox, it determines the layout's primary axis.
Explanation:
Flex-direction is the property of the flexbox. Flex-direction means what direction going flex items as row or column.
Row and column have the reverse option also, flex-direction will not work without flexible item it's mandatory.
In React, what is a Flux property?
Explanation:
Flux is a pattern for managing how data flows through a React application. As we've seen, the preferred method
of working with React components is through passing data from one parent component to it's children components.
The Flux pattern makes this model the default method for handling data.
Which of the following packages best demonstrates React's utility?
Explanation:
React Router is a standard library system built on top of the React and used to create routing in the React application
using React Router Package. It provides the synchronous URL on the browser with data that will be displayed on the
web page.
What isn't a part of CommonJS that is used to specify modules?
Explanation:
CommonJS is a module formatting system. It is a standard for structuring and organizing JavaScript code.
CJS assists in the server-side development of apps and it’s format has heavily influenced NodeJS’s module
management
Choose between JSX and JavaScript as a differentiating feature for use.
Explanation:
JS means javascript, so it is for javascript programming and JSX is to create react components. JSX is mainly used to
make the process easier for programmers to create react components. JS file is a file containing a program in text
format as usual of javascript code that is used to execute javascript instructions in web pages.
In React, which of the following is also referred to as the Flux initialization action?
Explanation:
The correct answer is Index.jsx, the entry point of the application
Which post-installation characteristic of Flux is connected to data flow?
Explanation:
Unidirectional data flow is a technique that is mainly found in functional reactive programming. It
is also known as one-way data flow, which means the data has one, and only one way to be
transferred to other parts of the application. In essence, this means child components are not
able to update the data that is coming from the parent component.
Choose Gulp's primary competitor.
Explanation:
Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification,
compilation, unit testing, and linting. It uses a command-line interface to run custom tasks defined in a file.
Which React API function call will generate a React component?
Explanation:
React.createClass allows you to generate component "classes." Under the hood, your component class is using a
bespoke class system implemented by React. With ES6, React allows you to implement component classes that
use ES6 JavaScript classes. The end result is the same -- you have a component class.