Skip to content

Commit

Permalink
Fix memory leak in React app + node headless proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
illiakovalenko committed Feb 27, 2020
1 parent 773ac26 commit 629b865
Show file tree
Hide file tree
Showing 5 changed files with 674 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export class SitecoreContext extends React.Component<SitecoreContextProps> {
} else {
this.contextFactory = new SitecoreContextFactory();
}
}

componentDidMount() {
// we force the children of the context to re-render when the context is updated
// even if the local props are unchanged; we assume the contents depend on the Sitecore context
this.contextFactory.subscribeToContext(this.contextListener);
Expand Down
Loading

0 comments on commit 629b865

Please sign in to comment.