I run some functions in my app.jsx file and all the functions are run twice while they should only run once.
import React, {useState} from 'react';
function App() {
function printer(e){
console.log(e);
}
["hello", "hi"].forEach(printer);
return (
<div>
Hello
</div>
);
}
export default App;
result console state:
App.jsx:34 "hello"
App.jsx:34 "hi"
VM679:236 "hello"
VM679:236 "hi"
how can I stop this VM679 from doing this?