3 ms·
You can use Redux with Angular 2, and it works quite well! The dev tools work the way you'd expect them to. Webpack hot module loading works well Angular 2 as w
by rpeden 10y ago
You can use Redux with Angular 2, and it works quite well! The dev tools work the way you'd expect them to. Webpack hot module loading works well Angular 2 as well. I agree that JSX is easier to debug. The Augury[1] Chrome extension serves the same purpose for Angular 2 as the React Dev Tools extension does for React.
That's not to say that React isn't great too! I like it lot.
[1] https://augury.angular.io/ https://augury.angular.io/
- tracker1 10y agoHow does it do with synching your route state with the redux store? I remember when I played with it (think routing has been replaced twice since) that was the real beast, though redux was a pretty nice fit other than that.
- rpeden 10y agoThat's a good question; I didn't try it. On the bright side, if you don't mind diving one layer below the surface, the code for react-router-redux is short, well written, and easy to understand: https://github.com/reactjs/react-router-redux https://github.com/reactjs/react-router-redux Even if the equivalent already exists for the current iteration, you could probably write your own in an afternoon without rushing yourself too much.
- tracker1 10y agoThat's kind of what I did... It was not in a modular fashion though as a lot of it was trying to discover how the lifecycle worked in Angular 2... basically, I wanted to be able to trigger an effective redirect from angular or via redux action or via a route/hash change, and have the redux always reflect the current route... there were some bits with how the change detection works in ng2 that I had to tap into, apparently this is one of the bits that changed since I last used it though. If I have to use ng2 again will take the time... aside, I really wish they'd renamed it to Angular 3 (3.0) for release, given the massive changes to "Angular 2" over its' lifetime and the number of broken blog articles and tutorials...