P
P
PaladinFrom3352020-07-30 21:56:33
React
PaladinFrom335, 2020-07-30 21:56:33

How to make page opening default?

How can I make it so that when I start the application, by default, a page is launched, let's say with path='/main'?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Galishnikov, 2020-07-30
@galishmann

If you want to redirect from the main page to /main and if you are using react-router, you can use a component from the react-router module. <Redirect from='/' to='/main' />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question