The https://reactjs.org/docs/hooks-rules.html#explanation states that do not conditionally call the hooks inside the component which I get it based on the explanation.
I