add use case of imports in different files on test_app
This commit is contained in:
parent
3b60793b25
commit
671bf58433
|
@ -1,11 +1,20 @@
|
||||||
import { Component } from 'react';
|
import { Component } from 'react';
|
||||||
|
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||||
|
window.SimpleStorage = SimpleStorage;
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
|
action() {
|
||||||
|
console.log("calling...")
|
||||||
|
SimpleStorage.methods.get().call(function(err, value) {
|
||||||
|
alert(value);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<header className="App-header">
|
<header className="App-header">
|
||||||
<h1 className="App-title">Welcome to React</h1>
|
<h1 className="App-title" onClick={() => this.action() }>Welcome to React</h1>
|
||||||
</header>
|
</header>
|
||||||
<p className="App-intro">
|
<p className="App-intro">
|
||||||
To get started, edit <code>src/App.js</code> and save to reload.
|
To get started, edit <code>src/App.js</code> and save to reload.
|
||||||
|
|
|
@ -21,7 +21,7 @@ import 'bootstrap/dist/css/bootstrap-theme.css';
|
||||||
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
|
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
|
||||||
|
|
||||||
window.EmbarkJS = EmbarkJS;
|
window.EmbarkJS = EmbarkJS;
|
||||||
window.SimpleStorage = SimpleStorage;
|
//window.SimpleStorage = SimpleStorage;
|
||||||
window.Test = Test;
|
window.Test = Test;
|
||||||
window.Assert = Assert;
|
window.Assert = Assert;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue