React Flashcards
1
Q
What does it mean for a component to be mounted in React?
A
It has a corresponding element created in the DOM and ready to be interacted with.
2
Q
- How react handle event listeners?
A
React will listen to all events at the top level using a single event listener. This is good for performance and it also means that React doesn’t need to worry about keeping track of event listeners when updating the DOM.
3
Q
What’s setState and why it’s asynchronous operation?
A
- It tells react that the component state has been updated and you need to re-render the component.
- It’s async cuz react patch some state updates and run them one time to get some performance gains.
4
Q
What is children prop?
A
Children is a prop (this.prop.children) that allow you to pass components as data to other components
5
Q
What is React Fiber?
A
Fiber is the new reconciliation engine or reimplementation core algorithm in React 16.