We all know React is fast, it uses VDOM, it provides lifecycle methods and what not. But What is VDOM? How does it make React fast? How does it optimize changes? This talk aims to answer such questions about the internal workings of React.
Intended audience: Any developer working with React
-
Philosophy of React
- The declarative structure
- UI is a projection of data y = f(d)
- Component based architecture
- Learn once, write anywhere
-
Internal structure
- Elements, components and instances
- Renderers
- Reconciliation
-
Stack Reconciliation
- Talk about the old reconciliation algorithm when element tree is mounted/updated/unmounted.
- Diffing algorithm
- Explain how the old lifecycle methods came into being and how react controls them.
-
Fiber Reconciliation
- Aim of fiber
- What is a fiber and explain concept of WIP tree
- Pausing and resuming work based on requestIdleCallback
- Explain the new lifecycle methods
- What takes priority in fiber
-
Miscellaneous
- Synthetic events and event pooling
- Transactions
- Context
-
Shortcomings
- Talk about scenarios where using React might not be the best option and reason about them based on the previous explanation
I am a Software Developer at Postman. I have been developing web applications for the past 4 years. Currently, I spend my time building, optimizing and maintaining the web products of Postman.
https://www.slideshare.net/AnkitMuchhala/react-internals-how-understanding-react-implementation-can-help-us-write-better-code
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}