i want to change a variable value and than log it to the console from another function.
But when i am logging it its always the same output and not the changed one.
Ive already tried it with the useState hook but that seems to be the same problem.
`
let text = 'Hello World';
const handleStart = () => {
console.log(isStarted);
text = 'loaded';
//.....
};
const handleClick = index => {
console.log(text);
if (!isStarted) return;
//.....
};
`