React JS Interview Questions.

  1. We can go for keys when there is possibility that our user could change the data.
  • Keys
    ref
    both
    none of above
  1. JSX is typesafe.
  • True
    False
  1. React merges the object you provide into the current state using __________.
  • setState()
    State()
  1. Arbitrary inputs of components are called __________.
    Keys
  • Props
    Elements
    Ref
  1. _________ can be done while more than one element needs to be returned from a component.
    Abstraction
    Packing
    Insulation
  • Wrapping
  1. Which of the following needs to be updated to achieve dynamic UI updates?
  • State
    Props
  1. Lifecycle methods are mainly used ___________.
    To keep track of event history
    to enhance components
  • freeup resources
    none of the options
  1. State can be initialized when code is loaded or state can be set on event changes.
    False
  • True
  1. ref is used to refer a element / component returned by _______________.
    react()
  • render()
    reduce()
    refer()
  1. In JSX most of the errors can be caught during _________.
    Interpretation
    Execution
  • Compilation
    Build
  1. Components cannot refer to other components in their output.
    True
  • False
  1. JSX is faster because it performs ____________ while compiling code to JavaScript
    Modification
    Compression
  • Optimization
    Encryption
  1. If our elements are dynamic, react can keep track of the changes using keys.
  • True
    False
  1. Function that does not change its results for the same set of inputs are called __________.
  • Pure functions
    Impure Functions
  1. What is the smallest building block of ReactJS?
    none of the options
    props
  • elements
    components
  1. An altered component may be uniquely identified with the help of ref.
    True
  • False
  1. React considers everything as _______.
    User interface
    elements
  • components
    Objects
  1. React keeps track of what items have changed, been added, or been removed from a list using ________.
    state
    props
  • keys
    ref
  1. React is mainly for building _____________.
    Database
    Connectivity
  • User interface
    Design platform
  1. React supports all the syntax of _________________.
  • ES6
    Redux
    None of options
    Native Java
  1. In React state can be accessed using ________.
    current
  • state
    current()
    state()
  1. How can we prevent default behavior in React?
    None of the options
    using revokeDefault()
  • Using preventDefault()
    using avoidDefault()
  1. Invoked once, only on the client, after rendering occurs.
    componentWillUnmount
    shouldComponentUpdate
    componentWillMount
  • componentDidMount
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,854評論 0 10
  • 今日父親節(jié),當(dāng)?shù)拍?,?dāng)兒子四十三年,從管理學(xué)的角度看,學(xué)習(xí)、實習(xí)、實踐都很充足,然而,當(dāng)?shù)?,是要學(xué)的...
    黃不老閱讀 346評論 0 1
  • 你考駕照比我早很多,聽說教練都愛罵人的,我就問你當(dāng)初學(xué)的時候有沒有被教練罵,你異常淡定,徐徐的說“有啊,大概會開車...
    安是非識閱讀 201評論 0 0
  • 每當(dāng)炊煙升起,夕陽西下時,我喜歡安靜的坐在樓頂上,聞著熟悉的柴火味,看著被霞光占據(jù)的天空,然后就靜靜的聽著。嗯,爸...
    su1906閱讀 272評論 0 0
  • SQL 沒有全稱量詞?,但可以用命題邏輯的等價公式把帶有全稱量詞的謂詞轉(zhuǎn)換為等價的帶存在量詞的謂詞:(?x) P=...
    _Nullptr閱讀 1,833評論 0 1

友情鏈接更多精彩內(nèi)容