React is Killing your Performance and it's Your Fault | Assaf Krintza | Conf42 JavaScript 2021

Conference: Conf42 JavaScript 2021

Year: 2021

Assaf Krintza Co-Founder @ Livecycle React is a great tool for writing dynamic single page applications in a declarative way. But, in order to enjoy the benefits of the declarative programming style of React, under the hood a tree comparison algorithm known as the Reconciliation Algorithm runs on each state or prop update. While the algorithm is very performant and effective, it does have performance impact, and sometimes stepping out of the reconciliation loop is the better choice. When writing code in React there is sometimes a tendency to try and solve every problem in the application using React’s APIs, usually by searching for a specific library written with React. For example, you want to implement drag and drop? No problem - just DuckDuckGo “”React Drag and Drop Library”” and pick one of the many libraries out there. But sometimes, using React’s state and prop updates is not the best choice to handle things. React’s reconciliation algorithm triggering comes with a cost and in order to create fast and responsive web applications we should take that into account. In this talk we will learn all about the reconciliation algorithm. What triggers it, and more importantly when and how to avoid it. Other talks at this conference 🚀🪐 https://www.conf42.com​/js2021 — 0:00 Intro 0:26 Talk