0
good afternoon, I have the following program:
testing.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Testando </title>
</head>
<body>
<p> oi </p>
<script language="JavaScript" src="arquivo.js"></script>
</body>
</html>
and the file.js:
import { createStore } from 'redux';
function oi(a)
{
console.log(a)
}
console.log("oi")
let a=4
oi(a)
I’m trying to learn how to use Redux, but when using import, the browser gives me the error : Uncaught Syntaxerror: Unexpected token import. I’d like to know why you made a mistake
Which browser you are using?
– Sam
Are you using webpack ? or Babel ? How are you compiling/running the code ?
– Isac
Managed to solve?
– Sam
got yes, I imported the Redux in a script before calling the.js file, so it worked cool, thanks for all help :3
– Thiago Outeiro Pereira Damasce