React Flashcards
What is Reactjs?
React is a JavaScript library that makes building user interfaces easy. It was developed
by Facebook.
Does React use HTML?
No, It uses JSX, JavaScript XML. which is similar to HTML.
most significant drawbacks of React
there is no predefined way to structure your app
State the difference between Real DOM and Virtual DOM
.Real DOM Virtual DOM
It is updated slowly.It allows a direct update from HTML. It wastes too much memory.
.Virtual DOM
It updates faster.It cannot be used to update HTML
directly.Memory consumption is less
What is Flux Concept In React?
Flux is a pattern for managing how data flows through a React application.
There are three distinct roles for dealing with data in the flux methodology:
Dispatcher, Stores,Views
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.
What is the ‘Store’ feature in Redux?
Redux has a feature called ‘Store’ which allows you to save the application’s entire State
at one place. Therefore all it’s component’s State are stored in the Store so that you will
get regular updates directly from the Store. The single state tree helps you to keep track
of changes over time and debug or inspect the application.
What is an action in Redux?
Actions are plain JavaScript object that contains information.
. The action-type and the action data are always stored in the action object.
When was React first released?
React was first released on March 2013.
Name the important features of React
Virtual Dom
single page applications
SEO friendly with ssr
JSX
Component Driven
Explain the term stateless components
Stateless components are pure functions that render DOM-based solely on the
properties provided to them.
What is dispatcher?
A dispatcher is a central hub of app where you will receive actions and broadcast
payload to registered callbacks.
What is meant by callback function? What is its purpose?
A callback function should be called when setState has finished, and the component is
retendered. As the setState is asynchronous, which is why it takes in a second callback
function.
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.
What are Props in react js?
Props mean properties, which is a way of passing data from parent to child. We can say
that props are just a communication channel between components. It is always moving
from parent to child component.