peter_f
peter_f

Reputation: 258

Add url routing for some Redux state changes

I have a React + Redux web app that currently has no url routing.

I'd like to add it but so far everything that I've seen somehow changes the action dispatches to url changes and I'd like to change the url only for some of the actions.

Is there a way to do this?

Thanks!

Upvotes: 0

Views: 104

Answers (1)

JSTL
JSTL

Reputation: 868

If you intend to use React-Router for your routing, there are libraries, such as Connected-React-Router, to maintain the location as state in your Redux store and to dispatch actions to change the URL only when you need it.

Upvotes: 1

Related Questions