add use case of imports in different files on test_app

This commit is contained in:
Iuri Matias 2018-02-14 07:01:33 -05:00
parent 3b60793b25
commit 671bf58433
2 changed files with 11 additions and 2 deletions

View File

@ -1,11 +1,20 @@
import { Component } from 'react';
import SimpleStorage from 'Embark/contracts/SimpleStorage';
window.SimpleStorage = SimpleStorage;
class App extends Component {
action() {
console.log("calling...")
SimpleStorage.methods.get().call(function(err, value) {
alert(value);
})
}
render() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">Welcome to React</h1>
<h1 className="App-title" onClick={() => this.action() }>Welcome to React</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.

View File

@ -21,7 +21,7 @@ import 'bootstrap/dist/css/bootstrap-theme.css';
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
window.EmbarkJS = EmbarkJS;
window.SimpleStorage = SimpleStorage;
//window.SimpleStorage = SimpleStorage;
window.Test = Test;
window.Assert = Assert;