Interview - React

Define the term Redux in React

Redux is a library used for front end development. It is a state container for JavaScript applications which should be used for the applications state management. You can test and run an application developed with Redux in different environments.

Does React use HTML ?

No. It uses JSX, which is similar to HTML.

Explain error boundaries ?

Error boundaries help you to catch JavaScript error anywhere in the child components. They are most used to log the error and show a fallback UI.

Explain pure components in React js

Pure components are the fastest components which can replace any component with the only a render(). It helps you to enhance the simplicity of the code and performance of the application.

Explain React Router

React Router is a routing library which allows you to add new screen flows to your application, and it also keeps URL in sync with what's being shown on the page.

Explain strict model

Strict Mode allows you to run checks and warnings for react components. It runs only on development build. It helps you to highlight the issues without rendering any visible UI.

Explain synthetic event in React js

Synthetic event is a kind of object which acts as a cross-browser wrapper around the browser's native event. It also helps us to combine the behaviors of various browser into signal API.

Explain the Presentational segment

A presentational part is a segment which allows you to renders HTML. The segment's capacity is presentational in markup.

Explain the term high order component

A higher-order component also shortly known as HOC is an advanced technique for reusing component logic. It is not a part of the React API, but they are a pattern which emerges from React's compositional nature.

Explain the term stateless components

Stateless components are pure functions that render DOM-based solely on the properties provided to them.

Explain the use of 'key' in react list

Keys allow you to provide each list element with a stable identity. The keys should be unique.

Explain the use of the arrow function in React

The arrow function helps you to predict the behavior of bugs when passed as a callback. Therefore, it prevents bug caused by this all together.