Hacker News new | ask | show | jobs
by sravan_ess 3479 days ago
@nverba Hoi mate, Any pointers about using redux with polymer? I have been using polymer for some eight months now. I tried to implement redux in one of my components a couple of months back. But I couldn't finish it, because of the humongous refactoring work.
1 comments

You can check out polymer-redux (https://github.com/tur-nr/polymer-redux). It's makes it easy to integrate the redux store inside your components. Basically you will split up your components in two types: 1.) container components that are redux aware and subscribes to slices of your state graph and pure presentational components that are unaware of redux and are management by the container components. This is similar to what is suggested in React/Redux. This way you can re-use your presentational components elsewhere.

Check also this guide: https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

Thanks for the link. Still the presentational components have to be 2-way binded, right?
yeah either 2-way binding or just firing events which are handled in the container components (2 way binding is actually implemented using events)