Render React Widget in Angular Component

In Angular Wrapper Component Template (which will host the react component), identify the ID of the host div:

Then in component’s TS, do:

import * as ReactDOM from "react-dom";
import * as React from "react";

ngAfterViewChecked() {



In initializeReactWidget.js, return the react template:

<ReactWidgetWrapper AHandler={AHandler}


Finally, ReactWidgetWrapper.js:

import React, {PropTypes, Component} from 'react';

class ReactWidgetWrapper extends Component {
constructor(props) {

getChildContext() {
return {


render() {



ReactWidgetWrapper.childContextTypes = {


ReactWidgetWrapper.contextTypes = {


ReactWidgetWrapper.propTypes = {


export default ReactWidgetWrapper;

Turn display off in Windows 10

Though there are multiple ways to do this –

Here are the 2 that work the fastest for me-

  • Using the power button
  • Using this utility –
    • You can create a shortcut for launching it using keyboard, but in my experience, it adds delay. Instead, pin the program to taskbar, drag it to the top, and use “Windows Key and 1” to launch it.