Skip to content

Commit 076015a

Browse files
fixed importing bug
1 parent d9cf865 commit 076015a

File tree

1 file changed

+1
-1
lines changed
  • packages/react-scripts/template/src

1 file changed

+1
-1
lines changed

packages/react-scripts/template/src/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from 'react';
22
import logo from './logo.svg';
33
import './App.css';
4+
import loadAdd from './lib.rs';
45

56
class App extends Component {
67
constructor() {
@@ -16,7 +17,6 @@ class App extends Component {
1617
});
1718
break;
1819
case 'development':
19-
import loadAdd from './lib.rs';
2020
loadAdd().then(result => {
2121
const addtwo = result.instance.exports['addtwo'];
2222
alert(`return value was ${addtwo(2)}`);

0 commit comments

Comments
 (0)