Answer the question
In order to leave comments, you need to log in
How to create a Route with a path depending on the requests passed to the route component?
Code not working:
<Route path={"/:form?"} component={()=><LoginFormer form={form? "reregistration" : "login"} changeFormReg={changeFormForRegistation} changeFormLogin={changeFormForLogin} />} />
Answer the question
In order to leave comments, you need to log in
Inside the component, you read the props and make a redirect, for example, through window. location
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question