Re:An Introduction to Polymer - A Web Component Library
by nverba on Monday December 12, 2016 @07:03PM
(#13163292)
Also, using the two way binding is optional. We've been using Polymer for about the same time with Redux and a unidirectional data flow. I'm very happy with it.
[ Parent
| on HN ]
Re:An Introduction to Polymer - A Web Component Library
by sravan_ess on Tuesday December 13, 2016 @12:51AM
(#13164811)
@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.
Re:An Introduction to Polymer - A Web Component Library
by timeu on Tuesday December 13, 2016 @04:55AM
(#13165718)
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...
Re:An Introduction to Polymer - A Web Component Library
by sravan_ess on Tuesday December 13, 2016 @08:38PM
(#13173084)
Thanks for the link.
Still the presentational components have to be 2-way binded, right?