-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(789): ensure children passed to background component update
This commit refactors the `shouldComponentUpdate` function outside of the `BackgroundImpl` component. The refactored function, `__shouldComponentUpdate` takes `props` and `nextProps` as arguments and returns true if the children, imgixParams, contextRect, bounds, htmlAttributes, or top-level props have changed. It returns false if the props have not changed. The refactoring addresses an issue where changes to the children and imgixParams props were not detected and the child components therefore did not re-render. Co-authored-by: Frederick Fogerty <frederick@imgix.com>
- Loading branch information
Showing
1 changed file
with
55 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters