-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dicky
authored and
dicky
committed
May 24, 2020
1 parent
d0a4c84
commit a7debeb
Showing
9 changed files
with
5,791 additions
and
48 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react'; | ||
import { useConnect } from 'dotnetify'; | ||
|
||
interface State { | ||
Greetings: string; | ||
ServerTime: string; | ||
} | ||
|
||
export const HelloWorld = () => { | ||
const { state } = useConnect<State>('HelloWorld', this); | ||
return ( | ||
<div> | ||
<p>{state.Greetings}</p> | ||
<p>Server time is: {state.ServerTime}</p> | ||
</div> | ||
); | ||
}; |
15 changes: 10 additions & 5 deletions
15
...eact/HelloWorld.WebPack/src/HelloWorld.js → ...act/HelloWorld.WebPack/src/HelloWorld.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom'; | ||
import { HelloWorld } from './HelloWorld-withHook'; | ||
|
||
ReactDOM.render(<HelloWorld />, document.getElementById('App')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"noImplicitAny": false, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"sourceMap": true, | ||
"jsx": "react", | ||
"allowJs": true, | ||
"declaration": true, | ||
"declarationDir": "./typings", | ||
"lib": ["dom", "es7"] | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules", "**/*.spec.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.