Interview Questions Flashcards
What is React?
React is a popular JavaScript library for building user interfaces that allows developers to create interactive and dynamic web applications efficiently. It uses a component-based architecture to break down the UI into reusable, self-contained pieces.
What is Redux?
Redux is a JavaScript library used for managing the state of a web application in a predictable and centralized manner. Its primary purpose is to help maintain and update the application’s data in a consistent way, making it easier to manage and debug complex applications.
How does Redux work?
Redux manages the application’s state in a single store and manages the state with actions and reducers. Actions describe changes or events in-app while reducers specify how the state should modify based on the action. Components can subscribe to the store to receive the updated state, facilitating a structured data flow in the app.
What makes Redux so special?
Redux is special because it provides a predictable and centralized way to manage an application’s state.
Redux setup process?
install redux, create store, create reducers functions, create action objects, dispatch actions, connect components to store, subscribe components to store, optional middleware (redux-thunk), initialize state, and render components
What are reducers in Redux?
In Redux, reducers are functions that specify how an application’s state should change in response to actions.
Why do you choose React?
Because React is component-based, it promotes reusability and makes it easier to build complex applications. React uses the virtual DOM, optimizing rendering. Backed by a strong community and maintained by Facebook. React has a RIch ecosystem of 3rd party libraries (react-router, redux) that extend functionality.
What is AJAX?
Asynchronous Javascript and XML, allow the web app to retrieve data in the background making web apps faster and seamless. Sending and receiving data without refreshing the whole page
What is reponsive design?
creating websites that adapt to various screen-sized to ensure its user-friendly.
What is the difference between REST and RESTful API?
REST is the architectural style, the set of guidelines, best practices, and constraints.
RESTful API is the actual implementation of that architectural style. It’s what developers create and consumers (like apps or other services) interact with over the web.
what is a RESTful api?
A RESTful API is a web service that adheres to REST principles, using standard HTTP methods for clients to access and manipulate resources in a predictable way
RESTful APIs provide a standardized way to communicate with backend systems to create dynamic and interactive applications.
what is the purpose of a RESTful API?
The purpose of using a RESTful API is to enable applications to exchange data over the Internet in a standardized manner,
what is closure?
Closure is a function that retains access to variables in its outer scope even after the outer scop function has finished executing. This allows the inner function to “remember” those variables, providing a way to encapsulate data, often used for creating private variables and maintaining state within functions.
What is a promise?
A Promise is an asynchronous value, a value that is unknown now but can be known in the future. its like saying “I’ll let you know when I am done, you can decide what to do later whether success or error”. this way better to load data preventing the whole app from freezing.
What is a callback?
A function passed as a parameter to another function.
What are the major features of React?
component based which are reusable components to build complex apps, virtual dom and reconciliation which updates only specific components not the entire app, React allows you to write in JSX, JS syntax that makes your code more readable, strong community behind it
What is JSX?
JavaScript XML, a syntax extension used for Javasciprt used in React to describe how the UI should look like.. It is HTML-like code that makes it easier to create and render components in a readable manner. JSX later gets transformed into javascript with Babel.
What is the Virtual DOM?
Virtual DOM is a blueprint of the actual DOM.