<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Luca Zampetti on Medium]]></title>
        <description><![CDATA[Stories by Luca Zampetti on Medium]]></description>
        <link>https://medium.com/@actarian?source=rss-a4020bdeecd3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FHo_xRuRz39U5QGoC2gt7Q.jpeg</url>
            <title>Stories by Luca Zampetti on Medium</title>
            <link>https://medium.com/@actarian?source=rss-a4020bdeecd3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:48:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@actarian/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RxComp a modern ES6 alternative to Angular component framework]]></title>
            <link>https://medium.com/@actarian/rxcomp-a-modern-es6-alternative-to-angular-component-framework-4f0a84c2e4d1?source=rss-a4020bdeecd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f0a84c2e4d1</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[rxjs]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[rxcomp]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Luca Zampetti]]></dc:creator>
            <pubDate>Wed, 25 Dec 2019 20:19:29 GMT</pubDate>
            <atom:updated>2019-12-25T20:19:29.362Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog post we’ll talk about <a href="https://github.com/actarian/rxcomp">RxComp</a> a small Javascript component library built on top of <a href="https://github.com/ReactiveX/rxjs">RxJs</a> and still in beta stage, developed as a simple alternative to <a href="https://angular.io/">Angular</a> framework to use in all those occasions where angular is challenging to apply.</p><h4>Introduction</h4><p>Working as a developer, I find many occasions in which for team reasons we can’t implement a complex framework like Angular, say for the use of javascript code non-compliant with angular, say for the decision to use a more Vanilla like approach to the project.</p><p>In all those moments we are still missing the power and flexibility of the Angular declarative syntax and component modularity, up to the point we decided to implement all those features into a compact ES6 javascript library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gBFDgFa9Io2svHRH" /><figcaption>Photo by <a href="https://unsplash.com/@blakeconnally?utm_source=medium&amp;utm_medium=referral">Blake Connally</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>The goals of the RxComp component library</h4><p>Below is a list of what we consider to be the main outcomes of the library</p><ul><li>Advantages of the Template Declarative Syntax</li><li>Easy implementation</li><li>Modularity</li><li>Extensibility</li></ul><h4>What to consider out of scope</h4><p>We don’t want to rebuild another SPA framework; there is plenty that does an amazing job and cover every needs. For this reason, every feature listed below is considered out of scope</p><ul><li>Routing</li><li>HttpClient</li><li>Server Side Rendering</li><li>Dependency Injection</li><li>Change Detection</li><li>Two-Way Data Binding</li><li>Zone</li></ul><h4>So what is included in the library?</h4><p><strong>Modules</strong><br>CoreModule is shipped with the main <a href="https://github.com/actarian/rxcomp">RxComp</a> lib.<br>It includes declarations of all the basic directives, structural directives like *if and *for and Dom directives like <em>ClassDirective, </em><em>EventDirective, </em><em>InnerHtmlDirective and </em><em>StyleDirective.<br>You can also extend modules through </em><em>imports and </em><em>exports meta tags.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/012310e5e9362fa2f1acf0db0c094db7/href">https://medium.com/media/012310e5e9362fa2f1acf0db0c094db7/href</a></iframe><p><strong>Components</strong><br>Components define areas of responsibility in the user interface.<br>In the MVC paradigm, they could be viewed as controllers. <br>The library automatically setup for you these component properties through meta tags:</p><ul><li><strong>selector</strong><br>The CSS selector that identifies the component or directive inside the Dom or inside a template and triggers the instantiation of the component or directive.</li><li><strong>inputs</strong><br>It is possible to pass input values to components through HTML node attributes, just define yours named inputs as a meta collection and values will be automatically passed with OnPush change detection to the component.</li><li><strong>outputs</strong><br>As for inputs, outputs are defined as a named meta collection and automatically generated as RxJs Subjects for output event emitting.</li><li><strong>hosts</strong><br>You can define hosts as a key / Factory collection that will be auto resolved in the component parent hierarchy.</li><li><strong>template</strong><br>Even if the lib is designed to work with inline static template syntax, is also possible to define the component’s HTML template through the template meta tag.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2ef487b53514997198b5a8cd5421f21/href">https://medium.com/media/f2ef487b53514997198b5a8cd5421f21/href</a></iframe><p><strong>Pipes</strong><br>Pipes just work as Angular pipes version, they are static named functions used to transform values through declarative syntax.</p><p><strong>OnPush Strategy Change Detection<br></strong>There is no binding change detection on RxComp, the only way to update values of a component and all its child instances is through OnPush change detection. Just fire this.pushChanges(); method on a component when updating values is needed.</p><p><strong>FormModule</strong><br><a href="https://github.com/actarian/rxcomp-form">FormModule</a> is an extension of the core lib available as a separate <a href="https://www.npmjs.com/package/rxcomp-form">npm package</a>. It brings form validation and Reactive Forms.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7442802995a4a3dd41cbbc9f255201bd/href">https://medium.com/media/7442802995a4a3dd41cbbc9f255201bd/href</a></iframe><p><strong>In Conclusion</strong><br>If you like Angular declarative syntax but you just want to go Vanilla, <a href="https://github.com/actarian/rxcomp">RxComp</a> component library come in useful. Built on top of <a href="https://github.com/reactivex/rxjs">RxJs</a> it mimics the <a href="https://angular.io/">Angular</a> declarative syntax with a bundle size of 5.45Kb gzipped or 16.9Kb minified.</p><p><strong>Repository</strong><br><a href="https://t.co/bry0LAxz8h?amp=1">https://github.com/actarian/rxcomp</a></p><p><strong>Demo</strong><br><a href="https://t.co/AftEr64hvt?amp=1">https://actarian.github.io/rxcomp-todomvc</a></p><p><strong>Demo source</strong><br><a href="https://github.com/actarian/rxcomp-todomvc">https://github.com/actarian/rxcomp-todomvc</a></p><p><strong>Codepen</strong><br><a href="https://codepen.io/actarian/pen/QWWRZON?editors=0010">https://codepen.io/actarian/pen/QWWRZON?editors=0010</a></p><p>Any feedback would be much appreciated!</p><h4>Bootstrapping Module</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0cdc2e4b6bd2164b23b0baaf83a0b7e/href">https://medium.com/media/f0cdc2e4b6bd2164b23b0baaf83a0b7e/href</a></iframe><h4>Component Definition</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4302788697d6d179d28f129863446ca2/href">https://medium.com/media/4302788697d6d179d28f129863446ca2/href</a></iframe><h4>Declarative Syntax</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cfede92e6631ba115a39a700bdf7c27/href">https://medium.com/media/0cfede92e6631ba115a39a700bdf7c27/href</a></iframe><h4>LifeCycle Hooks</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6927f34c4e8147cc6cf085b62b8f088b/href">https://medium.com/media/6927f34c4e8147cc6cf085b62b8f088b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f0a84c2e4d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>