Skip to content

lacolaco/ngx-react

Repository files navigation

NgxReact

Work in Progress

@Component({
  template: `
  <react-render [element]="element"></react-render>
  `
})
class SimpleComponent {
  // Create React element
  element = <div>Test Element</div>;
}
@Component({
  template: `
  <react-render [element]="message$ | async"></react-render>
  `
})
class ReactiveComponent {
  // Update element when message changed
  message$ = this.messageService.message$.pipe(
    map(message => <div>{message}</div>)
  );
}