1

1) If I am importing a component, I can send props to component like this,

<ImportedComponent props={props} />

Is there any way to send props to a component, If I am using Route?

<Route path={"...somePath"} component= {someComponent} />

2) Also, If I am in the required path already, Is there any difference in using

<Route />

to load a component and directly referring imported component this way,

<ImportedComponent />
Yami Danchou
  • 205
  • 1
  • 2
  • 14

1 Answers1

0

You can use render

<Route
    path={"...somePath"}
    render={(props) => (<someComponent {...props} otherProps={otherProps} />)}
/>
nxmohamad
  • 1,124
  • 2
  • 12
  • 27