title: Passing arguments into props react-native?
body: <p>I'm new to react and am trying to figure out how things like props work. I want to have it so I can pass a function which i know how to do but i want to do it with some argument. I know my switch statement works because if I manually set the value it works as expected. I'm just too dumb to figure it out. Here is my code:</p>
  <pre><code>export default function App() {
    const [screen, setScreen] = useState(0);
  
    const setScreenState = () =&gt; { //I want to be able to pass an argument into here so that i can set the screen that is shown with my switch statement.
      console.log(&quot;setting screen&quot;);
    };
  
    switch (screen) {
      case 0:
        return &lt;WelcomeScreen setScreen={setScreenState} /&gt;;
        break;
      case 1:
        return &lt;ViewImageScreen setScreen={setScreenState} /&gt;;
        break;
      case 2:
        return &lt;ViewHelp setScreen={setScreenState} /&gt;;
        break;
    }
  }
  </code></pre>
  <p>This is probably a dumb question I'm just having a hard time wrapping my head around props and how the work. No matter how much I read or watch i just dont get it :(.</p>