Answers for "how to pass a prop in route"

6

route pass props to component

<Route
  path='/dashboard'
  render={(props) => (
    <Dashboard {...props} isAuthed={true} />
  )}
/>
Posted by: Guest on June-23-2020
1

how to pass a prop in route

<Route
  path='/dashboard'
  component={() => <Dashboard isAuthed={true} />}
/>
Posted by: Guest on May-02-2020

Code answers related to "how to pass a prop in route"

Code answers related to "Javascript"

Browse Popular Code Answers by Language