Skip to content

Instantly share code, notes, and snippets.

@mohandere
Created May 12, 2019 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohandere/54de85c8f4a34709e5c614d6a7562d77 to your computer and use it in GitHub Desktop.
Save mohandere/54de85c8f4a34709e5c614d6a7562d77 to your computer and use it in GitHub Desktop.
render() {
// A new version of ProductsListWithSearch is created on every render
const ProductsListWithSearch = withSearch(ProductsList);
// That causes the entire subtree to unmount/remount each time!
return <ProductsListWithSearch />;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment