Javascript & React Flashcards
What is React?
React is the most popular javascript library for building user interfaces. Building a component is easier with react as it is reduced to a function that returns HTML elements, called JSX.
What is Redux?
Redux is a state management library. It means that we can select the data from the state anywhere in the application, as well as perform complex manipulation with it.
How does Redux work?
it works using predefined actions, which can make different state manipulation. these actions need to be dispatched to the store in order for the state to change.
What makes Redux so special?
It is more scalable than React context API. Has got a wonderful debugging tool, which can allow going back in time for debugging purposes. Is the best for managing huge chunks of data
Redux set up process
Create a store and wrap the whole application with it. then you can create different reducers to manipulate different data from the store
What are reducers in Redux?
In Redux, a reducer is a pure function that takes an action and the previous state of the application and returns the new state. The action describes what happened and it is the reducer’s job to return the new state based on that action.
Why do you choose React?
reusability, huge community, easy to learn, in demand
- Component-based structure
- Easy learning curve
- Ability to integrate with third-party plugins
- The big community behind it
- Components ready to plug and play into an application
What is AJAX?
Is the way javascript code makes requests to the server, behind the scenes and receives information in different formats, like JSON and XML
What is responsive design?
It’s a web development approach that creates dynamic changes to the appearance of a website, depending on the screen size and orientation.
What is the difference between REST API and RESTful API?
There are no differences between REST and RESTful as far as APIs are concerned. REST is the set of constraints. RESTful refers to an API adhering to those constraints.
What is REST API
REST is a set of constraints:
- Uniform interface
- Client-server
- Stateless
- Cacheable
- Layered system
- Code on demand (optional)
What is closure?
an inner function nested inside some parent function has access to the variables (scope) defined in the parent function. (LEXICAL SCOPE)
What is a promise?
Is an object that represents an asynchronous completion of an operation, either failed or fulfilled
What is a callback?
a callback is a function passed inside another function as an argument
What are the major features of React?
It allows you to write custom components and have HTML tags in the form of JSX, hence the code is more maintainable and flexible. Declarative DOM: react takes care to update the UI when changing the state.
What is JSX?
JSX stands for JavaScript XML. JSX allows us to write HTML in React