Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for use with time travel dev tools? #49

Open
Koleok opened this issue Apr 21, 2016 · 7 comments
Open

Suggestions for use with time travel dev tools? #49

Koleok opened this issue Apr 21, 2016 · 7 comments

Comments

@Koleok
Copy link

Koleok commented Apr 21, 2016

Out of the box, using the chrome redux devtools with redux-ui-router does not work, but to be fair neither does ng-redux.

I have reconciled this on the ng-redux side by using a hack similar to the one in their example app, but so far have been totally unable to get to a state where cancelling or restoring an action with the devtools will actually route or unroute in my app.

I am really just wondering if anyone out there has been successful in doing this and some tips on how.

Also if there is a good solution it would be great to have it in the readme for this repo

@neilff
Copy link
Owner

neilff commented May 25, 2016

The navigation flow would only be one way the way it is currently implemented. You would need to likely rewrite the middleware.

I think you could subscribe to changes to the current route definition inside Redux and check to see each time it changes if it actually matches the real route... then you could have it sync up the routes if they are misaligned. Would probably need a bit more work than that, but it is possible.

@matt328
Copy link

matt328 commented Jul 23, 2016

I am new to the whole flux/redux thing, so it's possible I'm misunderstanding something, but what is the advantage of storing routing information in the redux state if the application does not route or unroute when the state changes?

@hally9k
Copy link
Collaborator

hally9k commented Jul 23, 2016

I'm not entirely sure I understand your question but here goes... The app doesn't necessarily have to route when part of the state changes that doesn't need to be expressed in the route. That said the routing state of the app is an important part of the app state and in Redux all app state resides in a central store. Here are some awesome videos by the creator of Redux that are really easy and succinct and should bring you up to speed on the Redux/Flux concepts pretty quickly.

@matt328
Copy link

matt328 commented Jul 24, 2016

Initially I guess I was looking for time travel support in my routing state similar to what this https://github.com/reactjs/react-router-redux project provides for react and react-router, and was questioning why redux-ui-router wasn't designed to provide that functionality.

If you don't get time travel dev tool support by having redux keep your router state then why is using redux (for router state) better than just letting the router itself be the 'one true source' for routing state?

@Koleok
Copy link
Author

Koleok commented Jul 26, 2016

@matt328 you should take a look at ng-component-redux by my buddy @bcarroll22

@Koleok
Copy link
Author

Koleok commented Jul 26, 2016

To be clear, his package does not propose to solve this problem, but it ports over some very useful concepts from the react-redux world, and i think some continuation down this path could yield a solution to the router/time-travel problem

@Koleok
Copy link
Author

Koleok commented Jul 26, 2016

redux-tiny-router might be something worth looking into also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants