Building Reusable Components With The Template Controller Pattern


#1

Just wrote a new post to lay out the pattern we’re using in Telescope. It’s a bit like template-level subscriptions 2.0, and I’d be curious to know what people think!

https://www.discovermeteor.com/blog/meteor-components-template-controller-pattern/


#2

Yeah! This is interesting :slight_smile:


#3

Hi Sacha, I’m curious if you can give me some recommendations what to learn for building reusable components with meteor (and Polymer). I have an MVP and I’m seeing the need to refactor my code to make it more maintainable. Aside from what you have just posted, do you have any recommendations what to look out for to create reusable components and easily maintainable meteor apps?


#4

I’d say just try to identify common patterns in your app (lists, menus, etc.) that you can refactor into shared components, and then try to treat these components as black boxes that take in an input and produce an output, independently of where or how they’re used.