Unless I'm mistaken, this is valid code:

```
useEffect(() => {
   if (prop1) {
      doSomething();
   }
}, []);

```

(prop1 is a prop). But when linting I get the following error:

```
React Hook useEffect has a missing dependency: 'prop1'. Either include it or remove the dependency array.

```

(react-hooks/exhaustive-deps) 

I don't want to pass prop1 as a dependency because I would lose the "only run on mount" behaviour. But I need to access the prop to doSomething(). 

Any suggestions?