diff --git a/test_app/app/js/app.js b/test_app/app/js/app.js index 64398919..c17684e1 100644 --- a/test_app/app/js/app.js +++ b/test_app/app/js/app.js @@ -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 (
-

Welcome to React

+

this.action() }>Welcome to React

To get started, edit src/App.js and save to reload. diff --git a/test_app/app/js/index.js b/test_app/app/js/index.js index 8f6332c5..b4271100 100644 --- a/test_app/app/js/index.js +++ b/test_app/app/js/index.js @@ -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;