Answer the question
In order to leave comments, you need to log in
How does the match function work in server rendering?
Hello, I don’t quite understand why they are needed and how then I work with some parameters that are passed to this function.
match({ routes, location: req.url }, (error, redirectLocation, renderProps) => {});
Answer the question
In order to leave comments, you need to log in
According to documentation :
Accordingly, you have three options:
// автоматически создаст историю
match({ routes, location})
// автоматически создаст историю, при этом передав параметр someOption
// выглядеть это будет примерно так
// createMemoryHistory(options)
match({ routes, location, someOption })
// вы создаете историю сами (звучит эпично)
match({ routes, location, history })
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question