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

你可能感兴趣的:(React JS Interview Questions.)