Preventing Unnecessary Renders

Let's optimize our code!

We'll cover the following

Memoizing The Callback #

toggle acts as a callback function and it’ll eventually be invoked by Expandable.Header. Let’s prevent any future performance issues by memoizing the callback.

Get hands-on with 1000+ tech skills courses.