julian joseph
julian joseph

Reputation: 330

react-router v4 alternative for v2 match({routes, location}, (err, redirectLocation, renderProps) => {})

I would like to know if react-router v4 supports match or doesn't. The docs say so, but I keep getting TypeError: (0 , _reactRouter.match) is not a function or is there an alternative which fulfills all that match () did.

Upvotes: 1

Views: 399

Answers (1)

julian joseph
julian joseph

Reputation: 330

4.0 is a complete rewrite. You will need to rethink much of how you do things and there isn't a straightforward upgrade path. For server rendering, check out that specific guide: https://reacttraining.com/react-router/web/guides/server-rendering

That was the answer from timdorr, one of the collaborators of react-router in github.

Upvotes: 2

Related Questions