Skip to content

Commit

Permalink
Added docs for workaround/fix of issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Grynhaus committed Aug 13, 2018
1 parent f59cd34 commit 0ef14d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/core/src/lib/components/wrapper-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ export abstract class ReactWrapperComponent<TProps extends {}> implements AfterV
this._setHostDisplay();
}

// NOTE: Workaround/fix for Issue #5 (https://github.com/Microsoft/angular-react/issues/5).
// The wrapper component isn't added to the root react nodes list when it's inside a `ReactContent` node, we manually add it (note that the root nodes list is a `Set`, so it won't duplicate nodes if already exist).
// There's potentially a better solution instead of this
const rendererData = this.renderer.data;
if (isReactRendererData(rendererData)) {
afterRenderFinished(() => {
Expand Down

0 comments on commit 0ef14d8

Please sign in to comment.