Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
import React from 'react'
import ReactDOM from 'react-dom'
import HelloWorld from './HelloWorld.jsx'
import dotnetify from 'dotnetify';
dotnetify.hubServerUrl = "http://localhost:5000";
ReactDOM.render(, document.getElementById('Content'))
import React from 'react';
import dotnetify from 'dotnetify';
dotnetify.hubServerUrl = "http://localhost:5000";
class HelloWorld extends React.Component {
constructor(props) {
super(props);
dotnetify.react.connect("HelloWorld", this);
this.state = { Greetings: "", ServerTime: "" };
}
render() {
return (
<div>
<p>{this.state.Greetings}</p>
<p>Server time is: {this.state.ServerTime}</p>
<p>
You can also edit <code>HelloWorld.cs</code>, save
to rebuild the server, and do page reload.</p></div>