I don't believe functions are tied to states.
oh, Im sorry.
From one component to other. How can I do that?
Make a public function, and call it from one component to another component...easy to do, but generally not a good design choice.
Here's the better way or proper way to do it.