Question: Ive got the state: const [isPressed, setIsPressed] = useState(false)
Then I want to pass the setIsPressed when navigating to another sreen, which i wrote:
On the from Screen:
onPress{() => navigation.navigate('Map', {setIsPressed})}
On the to Screen:
onPress={() => {navigation.navigate('DM'); setIsPressed(true);}}

However, I get an error saying 'setIsPressed is not a function' when pressing on the To Screen button

How do I fix this?

Answer: 
Have you tried with `const helloBtn = document.querySelector(".hello-btn");` or `querySelectorAll`?

```js
// Use const instead var
const helloBtn = document.querySelector(".hello-btn");

helloBtn.addEventListener("click", () => {
  console.log("Btn clicked");
});

const interval = window.setInterval(() => {
  helloBtn.click();
}, 4000);

```

Then you can use `<a href="https://www.google.com" class="hello-btn" target="blank">Google</a>` with **class** selector.
Try JQuery .bind() method, I used at several places

<https://api.jquery.com/bind/>