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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,136评论 0 10
  • 今日父亲节,当爹九年,当儿子四十三年,从管理学的角度看,学习、实习、实践都很充足,然而,当爹,是要学的...
    黄不老阅读 1,917评论 0 1
  • 你考驾照比我早很多,听说教练都爱骂人的,我就问你当初学的时候有没有被教练骂,你异常淡定,徐徐的说“有啊,大概会开车...
    安是非识阅读 1,196评论 0 0
  • 每当炊烟升起,夕阳西下时,我喜欢安静的坐在楼顶上,闻着熟悉的柴火味,看着被霞光占据的天空,然后就静静的听着。嗯,爸...
    su1906阅读 1,735评论 0 0
  • SQL 没有全称量词∀,但可以用命题逻辑的等价公式把带有全称量词的谓词转换为等价的带存在量词的谓词:(∀x) P=...
    _Nullptr阅读 5,640评论 0 1