React Flashcards
Props and cons using hooks
React hooks give us the capability to use functional components over class components. FC are easier to read, write with less code. FC are functions that take arguments and return value. Hooks are much more powerful, we can create custom hooks
Props and cons of using typescript
Personally since I discovered typescript I can’t stopped using it. It has some downsides like set proper interfaces might be challenging sometimes. But has a lot of positives. Is much easier to read and debug.
What react works?
React creates a virtual DOM. when state changes in a component, first it runs diffing Algoritm , which identifies what has changed in the virtual DOM, and then updates changes.
What is JSX
JSX isa syntax expression for Javascript. After compilation JSX becomes regular Javascript objects
What is difference between class components and functional components
Class components allows us to locate state and hooks. Functional components jute read props don’t have their own state
What is HOC?
Higher Order Components is a function that takes a component and returns a new component
What is Redux
The entire state of the app is kept in a single store. A stroke is a Javascript object. The only way to change the state is by firing action and write reducer for that action that changes the state. Reducer cannot have any side effects