Ext JS/React JS MCQ Sample Test,Sample questions

Question:
 .............. helps react for keeping their data unidirectional.

1.JSX

2.Flux

3.Dom

4.Props


Question:
 In React what is used to pass data to a component from outside?

1.setState

2. render with arguments

3.props

4.Types


Question:
 Mit welchem Befehl starten wir die React App?

1.npm run dev

2. npm serve

3.npm start

4. npm build


Question:
 Variabel yang dapat dipanggil di dalam komponen lain dalam React JS dan juga menghubungkan Komponen satu dengan yang lain

1.props

2.state

3.var

4.const


Question:
 What happens when the following render() method executes?<br /><br /> render(){<br /> let langs = ["Ruby","ES6","Scala"]<br /> return (<div><br /> {langs.map(it => <p>{it}</p>)}<br /> </div>)<br /> }<br />

1.Displays the list of languages in the array

2.Error. Cannot use direct JavaScript code in JSX

3.Displays nothing

4.Error. Should be replaced with a for..loop for correct output


Question:
 What is a controlled input element?

1.An input element with the controlled flag

2.An input element that is controlled by the value of another input element

3.An input element that can only accept a list of characters

4.An input element whose value is being controlled by a component’s state


Question:
 What is state in React?

1.A persistant storage.

2.An internal data store (object) of a component.

3.both (a) and (b)

4.None of the above


Question:
 What was the Output?const [data , setData] = useState("Alex");console.log(data);

1.data

2.data

3.Alex

4. none of the above


Question:
At the highest level, React components have lifecycle events that fall into

1.Initialization

2.State/Property Updates

3.Destruction

4.All of these


Question:
Axios is an __________?

1.Framework

2.Library

3.Package

4.All These Above


Question:
Everything in react is

1.Package

2.Model

3.Method

4.Component


Question:
How do you write an inline style specifying the font-size:12px and color:red; in JSX

1.style={{font-size:12,color:'red'}}

2.style={{fontSize:'12px',color:'red'}}

3.style={fontSize:'12px',color:'red'}

4. style={{font-size:12px,color:'red'}}


Question:
How many elements does a react component return?

1.Elements

2.1 Element

3.Multiple Elements

4.None of These


Question:
In which directory React Components are saved?

1.Inside js/components/

2.Inside vendor/components/

3.Inside external/components/

4.Inside vendor/


Question:
Life cycle methods of a components fall under following categories?

1.Mounting, Unmounting

2.Mounting, Updating

3.Mounting, Updating, Unmounting

4.All of the above


Question:
One can define default values for properties, props, using which of the following method?

1.getDefaultProps

2.getPropsValue

3.getInitialState

4.None of these


Question:
Penulisan kode yang benar untuk array function

1.tambah = () = {}

2.tambah = () => {}

3. tambah = []

4.tambah = {}


Question:
Penulisan Sintaks dengan ekstensi Java Script yang benar adalah

1.onChange dan classname

2.className dan onClick

3.onclik dan OnChange

4.none of the above


Question:
Perulangan dalam React JS dapat dilakukan dengan menggunakan

1.map

2.looping

3.loop

4.mapping for


Question:
React is for building _________

1.Connectivity

2.User Interface

3.Database

4.All of the above


Question:
React JS memiliki sintaks ekstensi javascript yang disebut dengan

1.XML

2.HTML

3. JSE

4.JSX


Question:
React JS merupakan

1.bahasa pemograman server-side Java Script

2.framework User Interface PHP

3.framework User Interface Java

4.framework User Interface Java Script


Question:
React.Js is a __________?

1.Framework

2.Library

3.both (a) and (b)

4.None of these.


Question:
React.Js was created by ___________?

1.Google

2.Microsoft

3.Facebook

4.All of above


Question:
Salah satu jenis Router dalam React JS

1.SearchRouter

2.FindRouter

3.BrowserRouter

4.GetRouter


Question:
There are two types of components in React JS

1.UseState, Stateless

2.Statefull, Stateless

3.Unstatefull Statefull

4.None of these


Question:
Untuk menghubungkan Back-End dan Front-End diperlukan penggunaan __

1.API

2.render

3. Both A & B

4.none of the above


Question:
Variabel default React JS

1.Props

2.Statefull

3.Stateless

4.State


Question:
What are the two ways that data gets handled in React?

1.state & props

2.services & components

3.Both A and B

4.None of These


Question:
What function allows you to render React content in an HTML page?

1.React.mount()

2.ReactDOM.start()

3.ReactDOM.render()

4.React.render()


Question:
What function can be used to update state?

1.setState()

2.updateState()

3.upState()

4.downState()


Question:
What is a good use case for using a function while rendering a dynamic list of items

1.If we need to compute a value based on properties of items in the loop.

2.None. Functions should not be used while rendering a dynamic list.

3.To make the code shorter

4.None of the above


Question:
What is a good use case for using a function while rendering a dynamic list of items

1.If we need to compute a value based on properties of items in the loop.

2.None. Functions should not be used while rendering a dynamic list.

3.To make the code shorter

4.None of the above


Question:
What is Axios in Node?

1.npm component

2.Promise based HTTP client for the browser and node.js

3.A company

4.None of these


Question:
What is JSX?

1.it is a syntax extension to JavaScript.

2.JSX produces data.

3.Tool to control the data

4.None of the above


Question:
What is React.Js used for?

1.Server-Side

2.Client-Side

3.For Both

4.None of these


Question:
What is ReactJS?

1.Server side Framework

2.User-interface framework

3.A Library for building interaction interfaces

4.None of the above


Question:
What is the DOM?

1.Document Object Model

2.Data Object Model

3.Data Option Model

4.Documentation Object Model


Question:
What is the second argument for setState useful for?

1.To invoke code after the setState operation is done

2.To replace the state completely instead of the default merge action

3.To access the previous state before the setState operation

4.None of the above


Question:
When it is recommended to pass this.setState as a function instead of an object?

1.When the new state should completely replace the old state

2.When the new state depends on the old state

3.When the new state does not depend on the old state

4.None of the above


Question:
Which concept includes OOP's?

1.Functional Components

2.Class Components

3.Oriented Components

4.None of the above


Question:
Which method is not part of ReactDOM?

1.ReactDOM.destroy()

2.ReactDOM.hydrate()

3.ReactDOM.createPortal()

4.ReactDOM.findDOMNode()


Question:
Which of the following API is a MUST for every ReactJS component?

1.getInitialState

2.render

3. renderComponent

4.None of the above


Question:
Which of the following below act as the input of a class-based component?

1.class and factory

2.render and mount

3.props

4.none of the above


Question:
Which of the following is correct syntax for a button click event handler, foo?

1.<button onclick=this.foo()>

2.<button onclick=this.foo>

3.<button onClick={this.foo()}>

4.<button onClick={foo}>


Question:
Which of the following is correct syntax for a button click event handler, foo?

1.<button onclick=this.foo()>

2.<button onclick=this.foo>

3.<button onClick={this.foo()}>

4.<button onClick={foo}>


Question:
Who Develop React.js?

1.Apple

2.Facebook

3.Twitter

4.Google


Question:
Who is the father of React.js?

1.Jordan mike

2.Jordan Walke

3.Nile

4. Nike John


Question:
_____ Home from './components/Home';Lengkapi Code di atas

1.import

2.di atas

3.Both A & B

4.none of the above


More MCQS

  1. React JS MCQ
  2. AngularJs MCQ
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!