<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mats Pfeiffer</title>
    <description>The latest articles on DEV Community by Mats Pfeiffer (@matsp).</description>
    <link>https://dev.to/matsp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F131161%2F90a81cf1-418d-4f82-a280-5b906c25ed40.jpg</url>
      <title>DEV Community: Mats Pfeiffer</title>
      <link>https://dev.to/matsp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/matsp"/>
    <language>en</language>
    <item>
      <title>Develop Flutter in a VS Code devcontainer</title>
      <dc:creator>Mats Pfeiffer</dc:creator>
      <pubDate>Sat, 22 Aug 2020 18:59:50 +0000</pubDate>
      <link>https://dev.to/matsp/develop-flutter-in-a-vs-code-devcontainer-350g</link>
      <guid>https://dev.to/matsp/develop-flutter-in-a-vs-code-devcontainer-350g</guid>
      <description>&lt;p&gt;In the last post I wrote about a docker image which let you use Flutter without local installation. &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/matsp" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F131161%2F90a81cf1-418d-4f82-a280-5b906c25ed40.jpg" alt="matsp"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/matsp/let-docker-flutter-for-you-3gc2" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Let docker flutter for you&lt;/h2&gt;
      &lt;h3&gt;Mats Pfeiffer ・ May 15 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#flutter&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#android&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#docker&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#linux&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;In this post we want to get this idea further and use the VS Code &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack" rel="noopener noreferrer"&gt;remote extensions&lt;/a&gt; which let us open a local directory in a docker container. &lt;/p&gt;

&lt;p&gt;All we have to do is to first install the extension. Create an empty directory or if you have an existing Flutter project add this file to your project. But be sure to use a Dart conform name like &lt;code&gt;flutter_app&lt;/code&gt; not &lt;code&gt;flutter-app&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.devcontainer/devcontainer.json&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Flutter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"matspfeiffer/flutter:beta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"dart-code.dart-code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dart-code.flutter"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now you have to &lt;code&gt;reopen&lt;/code&gt; the currect directory in the container:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8hdp1b12fe3xnr10ikts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8hdp1b12fe3xnr10ikts.png" alt="Reopen in container"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Doing this the first time could take a few minutes because docker is pulling the image in the background which depends on your connection speed. Once the container build and startup is finished your project is mounted in the container.&lt;br&gt;
When you started with an empty project, we will now create a new Flutter project - you can use the VS Code Flutter extension or use the shell like I prefer. Therefore just open a new terminal and execute the following command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F22d0zbbempdedk7fsny4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F22d0zbbempdedk7fsny4.png" alt="Create project"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To debug the app as web application you will need Chrome and this &lt;a href="https://chrome.google.com/webstore/detail/dart-debug-extension/eljbmlghnomdjgdjmbdekegdkbabckhm" rel="noopener noreferrer"&gt;extension&lt;/a&gt;. After installing that please navigate to &lt;code&gt;lib/main.dart&lt;/code&gt; and press F5. This will launch a new browser tab and you have to click the &lt;code&gt;Dart debug plugin&lt;/code&gt; to finally open the app.&lt;/p&gt;

&lt;p&gt;UPDATE:&lt;/p&gt;

&lt;p&gt;If you want to use an android emulator device follow the VScode devcontainer advices in the &lt;a href="https://github.com/matsp/docker-flutter" rel="noopener noreferrer"&gt;README&lt;/a&gt;. Their is no real good and performant solution when you want to support all operating systems. Linux users have some advantages because they can forward the X11 system &amp;amp; KVM to the container. The best working solution for MacOS and Windows is to use an emulator devices running natively on the host.&lt;/p&gt;

&lt;p&gt;If you have a better idea for a performant solution feel free to leave a comment or create an issue at Github.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/matsp/docker-flutter" rel="noopener noreferrer"&gt;Flutter docker image repository @Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/docs/remote/remote-overview" rel="noopener noreferrer"&gt;VS Code Remote Development&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>vscode</category>
      <category>linux</category>
      <category>macos</category>
    </item>
    <item>
      <title>Let docker flutter for you</title>
      <dc:creator>Mats Pfeiffer</dc:creator>
      <pubDate>Fri, 15 May 2020 20:21:11 +0000</pubDate>
      <link>https://dev.to/matsp/let-docker-flutter-for-you-3gc2</link>
      <guid>https://dev.to/matsp/let-docker-flutter-for-you-3gc2</guid>
      <description>&lt;p&gt;After installing the Flutter and Android SDK several times on different machines I always ended up with a broken setup where some part of the puzzle was not working anymore.&lt;/p&gt;

&lt;p&gt;I decided to improve this situation but wanted no limitations compared to a local installation. So the image must be able to execute Flutter in my current host directory, start an emulator and hot reload the app and let me test Flutter for Web. &lt;/p&gt;

&lt;p&gt;This is what I've come up with:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/matsp" rel="noopener noreferrer"&gt;
        matsp
      &lt;/a&gt; / &lt;a href="https://github.com/matsp/docker-flutter" rel="noopener noreferrer"&gt;
        docker-flutter
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      flutter docker image with full android sdk
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;and support the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Flutter commandline tool&lt;/li&gt;
&lt;li&gt;Start an emulator and hot reload the app on it (with hardware accerlation)&lt;/li&gt;
&lt;li&gt;Serve Flutter app as Web app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On my machines I setup some aliases to transparently map a &lt;code&gt;docker run&lt;/code&gt; command. Executing Flutter in the image feels just as executing it locally.&lt;/p&gt;

&lt;p&gt;For me the best feature is a predictable behavior on all my machines with no traces. With two commands you will have the flutter example app up and running.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;UID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;GID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--workdir&lt;/span&gt; /project &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;:/project matspfeiffer/flutter create &lt;span class="nb"&gt;.&lt;/span&gt;

xhost &lt;span class="nb"&gt;local&lt;/span&gt;:&lt;span class="nv"&gt;$USER&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-ti&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;UID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;GID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 42000:42000 &lt;span class="nt"&gt;--workdir&lt;/span&gt; /project &lt;span class="nt"&gt;--device&lt;/span&gt; /dev/kvm &lt;span class="nt"&gt;--device&lt;/span&gt; /dev/dri:/dev/dri &lt;span class="nt"&gt;-v&lt;/span&gt; /tmp/.X11-unix:/tmp/.X11-unix &lt;span class="nt"&gt;-e&lt;/span&gt; DISPLAY &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;:/project &lt;span class="nt"&gt;--entrypoint&lt;/span&gt; flutter-android-emulator  matspfeiffer/flutter


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I agree - the commands are not looking very friendly - but mapped with an alias it's just like:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

flutter create &lt;span class="nb"&gt;.&lt;/span&gt;
flutter-start-emulator


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7c280xz2vefalbwb1g7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7c280xz2vefalbwb1g7j.png" alt="Emulator run in docker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am using Linux as my operating system which could mean that there are bugs for MacOS and Windows. Especially forwarding the X system and qemu accerlation could be an interesting task under Windows and MacOS. I already read that it is possible but I could need help with testing it. A&lt;/p&gt;

&lt;p&gt;If your are interested feel free to test the image and issue bugs. I would really appreciate any support to make this image usable for everyone who want's to start with Flutter.&lt;/p&gt;

&lt;p&gt;So hopefully we hear again in the comments or at Github!&lt;/p&gt;

&lt;p&gt;UPDATE:&lt;/p&gt;

&lt;p&gt;Checkout the &lt;a href="https://github.com/matsp/docker-flutter" rel="noopener noreferrer"&gt;README&lt;/a&gt; to read about solutions for Windows and MacOS users as well!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>docker</category>
      <category>linux</category>
    </item>
    <item>
      <title>Composition in concave</title>
      <dc:creator>Mats Pfeiffer</dc:creator>
      <pubDate>Wed, 19 Jun 2019 20:25:45 +0000</pubDate>
      <link>https://dev.to/matsp/composition-in-concave-3pea</link>
      <guid>https://dev.to/matsp/composition-in-concave-3pea</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a cross-post from my &lt;a href="https://www.matspfeiffer.dev/blog/2019-06-19_composition-in-concave.html"&gt;blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Composition of components in &lt;a href="https://github.com/concave-org/concave"&gt;concave&lt;/a&gt; is different to other component based frameworks or compilers. In concave you don't compose entire components you just compose render functions which will return HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;I have created a simple Todo App to show you some code.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/e5tmc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Both imports &lt;a href="https://github.com/concave-org/codesandbox-composition/blob/master/src/renderfns/list.js"&gt;list&lt;/a&gt; and &lt;a href="https://github.com/concave-org/codesandbox-composition/blob/master/src/renderfns/listItem.js"&gt;listItem&lt;/a&gt; are just functions that return HTML. Arrays will be automatically joined by the &lt;a href="https://github.com/concave-org/concave#html"&gt;html&lt;/a&gt; function for less code in your template.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pro and contra
&lt;/h2&gt;

&lt;p&gt;I created concave to have a simple framework which isn't hiding complex tasks from me. What I want is to have simple and understandable code without "magic". With template composition I can concentrate on how I want to transform data and show it to my users. With other frameworks you have the ability to have e.g. child components and communicate with them, but this is getting more complex with more components you introduce.&lt;/p&gt;

&lt;p&gt;On the other side it's harder to isolate common code in components e.g. lazy-loading of data. That's for sure easier with popular frameworks like React. It's not impossible to do it concave - did it on my &lt;a href="https://www.matspfeiffer.dev"&gt;portfolio&lt;/a&gt; - but it needs more experience to figure out how things are working in concave. At the end it's just JavaScript!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Components in concave are little bit different to other frameworks when you are familiar with the concept. In concave components are composing render functions and render them with props and state. In my opinion the reusability of render functions is a lot better than entire components because I don't need to think of the internals of this components. If you need component-to-component communication you can dispatch an action and react on that with an &lt;a href="https://github.com/concave-org/concave#component"&gt;actionReducer&lt;/a&gt; in another component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/concave-org/concave"&gt;concave&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>javascript</category>
      <category>ui</category>
    </item>
    <item>
      <title>Spreading pipelines of components</title>
      <dc:creator>Mats Pfeiffer</dc:creator>
      <pubDate>Wed, 15 May 2019 18:02:29 +0000</pubDate>
      <link>https://dev.to/matsp/spreading-pipelines-of-components-1969</link>
      <guid>https://dev.to/matsp/spreading-pipelines-of-components-1969</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is a cross-post from my &lt;a href="https://www.matspfeiffer.dev/blog/2019-05-15_spreading-pipelines.html"&gt;blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;... to your browser like a concave lense will spread light rays. Keep this sentence in your mind and come back here after the post.&lt;/p&gt;

&lt;p&gt;If you are now wondering what the hell I am talking about, you are absolute right. With this sentence I want to explain the main concept of my idea of building a Single Page Application with &lt;a href="https://github.com/concave-org/concave"&gt;concave&lt;/a&gt; - a tiny JavaScript UI framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Another JavaScript UI framework?
&lt;/h2&gt;

&lt;p&gt;Yes... feel free to leave this post before even reading it, because this is the main pattern in nowadays tech arguments. Everything nowadays must be build with one of the top leading UI frameworks / libraries. There is a lot of hype around the major ones and it's clear why: Generating money with complexity. There are courses, videos, tutorials, workshops, conferences, podcasts, youtube channels and so on. People earn money to explain the concepts behind because there are some times so many that not every employee can follow up. It's okay for me that this industry exists, but I'm not okay with blindly following or advertising one golden approach which will lead to complexity in the wrong field. What I'm seeing a lot on the web platform is that people first choose &lt;strong&gt;the tool&lt;/strong&gt; and afterwards adapting the problem they are facing to fit it.&lt;/p&gt;

&lt;h2&gt;
  
  
  My motivation
&lt;/h2&gt;

&lt;p&gt;I'm a person that is really into performance optimization and tries to get the most out of something. The funny thing is, that I ingored that deep motivation in me and was really surprised by the result at the end. I wanted to create something simple with just a few easy understandable concepts. The framework should be shipped with batteries, so that developers only need one dependency. It should be directly usable in modern browsers to allow prototyping in sandboxes. And the most important point was to just use &lt;strong&gt;the platform&lt;/strong&gt; and keep a potential bundler build process as simple as possible.&lt;/p&gt;

&lt;p&gt;"Okay okay... all this already exists!" Maybe yes, maybe not. What I wanted to build is a framework that has no dependencies and is implemented in modern vanilla JavaScript. It should have everything that I need to build a functional SPA - this means it need at least a router (builtin), eventually a store to manage you application state (builtin) and some architectural guide to structure the code in components.&lt;/p&gt;

&lt;p&gt;I told you that I have a heart for performance on the web, so I set myself a goal to reach this in 1 KiB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPOILER&lt;/strong&gt;: I missed the goal, but it's not far away. &lt;/p&gt;

&lt;p&gt;Sometimes it's good to have an unrealistic goal because it forces you to think different and walk other ways. And isn't that exactly what I wanted to reach in the first place: Explorer new ideas to face a set of problems instead of blindly follow the mainstream.&lt;/p&gt;

&lt;h2&gt;
  
  
  The framework: concave
&lt;/h2&gt;

&lt;p&gt;Here are some key facts about &lt;a href="https://github.com/concave-org/concave"&gt;concave&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative&lt;/strong&gt; - Components are powered by a ES6 template tag function to easily define templates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reactive&lt;/strong&gt; - Components will be updated &amp;amp; re-rendered automatically by state changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batteries included&lt;/strong&gt; - State management &amp;amp; router are builtin without any dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal&lt;/strong&gt; - &amp;lt; 1.5 KiB minimized &amp;amp; gzipped dependency free ESM module&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's start with a boring Hello World:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/6nv5q4n8m3"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you want a pure browser experience try out this &lt;a href="https://codesandbox.io/s/github/concave-org/codesandbox-esm"&gt;CodeSandbox&lt;/a&gt; which uses just the native ES module.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/concave-org/concave#concept"&gt;Concept&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The main concept consists of a pipeline of functions which will be controlled with actions (plain JavaScript objects). If you are familiar with functional programming concepts, then you will recognize that a pipeline in concave is mostly the same as the result of a &lt;code&gt;pipe&lt;/code&gt; function in FP.&lt;/p&gt;

&lt;p&gt;There are the following predefined factory functions which will return ready to use pipeline functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;createStore&lt;/code&gt; &amp;gt;&amp;gt; creates a store pipeline function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createRouter&lt;/code&gt; &amp;gt;&amp;gt; creates a router pipeline function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createRenderer&lt;/code&gt; &amp;gt;&amp;gt; creates a renderer pipeline function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createComponent&lt;/code&gt; &amp;gt;&amp;gt; creates a component pipeline function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They will be composed with &lt;code&gt;createPipeline&lt;/code&gt; which returns a pipeline of functions. You can also compose pipelines with &lt;code&gt;createPipeline&lt;/code&gt; if you want. This could be interesting if you want to compose different parts of your application.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;runPipeline&lt;/code&gt; you start your pipeline and the first action (state) will flow through the functions.&lt;/p&gt;

&lt;p&gt;Through all of these composed functions, actions will be passed to control your application.&lt;/p&gt;

&lt;p&gt;E.g. the &lt;code&gt;state&lt;/code&gt; action - when a component receive this action, it will check if it need to update itself and will trigger a render action on the pipeline if neccessary.&lt;/p&gt;

&lt;p&gt;This simple concept results in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unidirectional action flow &amp;gt;&amp;gt; time traveling &amp;amp; easy debugging&lt;/li&gt;
&lt;li&gt;Pure components &amp;gt;&amp;gt; predictive rendering results&lt;/li&gt;
&lt;li&gt;Single source of truth store &amp;gt;&amp;gt; only a state reducer can modify the state&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Internals
&lt;/h3&gt;

&lt;p&gt;Concave uses a really naive rendering approach internally. If a component uses a property that is stored in the state and this prop changes, then your whole component will be replaced by the new one. This sounds like a terrible idea doesn't it? The truth is for every example I build so far this was no problem, but I'm not a fool: This rendering approach will not scale well for real big applications with a lot of data exchange. This is okay because it's not build for that case. It's build for really fast boot up and small footprints on your asset budgets. Keep in mind that you don't have to think about &lt;em&gt;why&lt;/em&gt;, &lt;em&gt;why not&lt;/em&gt;, &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;when not&lt;/em&gt; your UI will update. It's always the same behavior - naive, simple and working.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to use concave?
&lt;/h3&gt;

&lt;p&gt;Valid use cases to try out concave:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;small to medium sized SPAs&lt;/li&gt;
&lt;li&gt;static SPAs (e.g. portfolios, blogs, side projects)&lt;/li&gt;
&lt;li&gt;Progressive Web Applications (PWAs)&lt;/li&gt;
&lt;li&gt;bootstraping a bigger sized web application&lt;/li&gt;
&lt;li&gt;small teams that can figure out their own architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't use concave:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SPAs with a lot of reactive data&lt;/li&gt;
&lt;li&gt;applications with a lot of animations (re-rendering will trigger them eventually)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;This post was a quick intro to concave. If you are interested in more details checkout the GitHub repository of &lt;a href="https://github.com/concave-org/concave"&gt;concave&lt;/a&gt; where your find more information about internals.&lt;/p&gt;

&lt;p&gt;I just started to build a portfolio of mine with concave, so feel free to check it out. I will fill more data soon, to have an idea of performance with concave.&lt;/p&gt;

&lt;p&gt;For updates, follow-up posts or sarcastic Tweets follow me on Twitter!&lt;/p&gt;

&lt;p&gt;Thanks for all who read the whole post till the end! It's my first post on dev.to so I will appreciate any feedback or comments :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/concave-org/concave"&gt;concave@GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/matsp"&gt;me@GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/matspfeiffer"&gt;me@Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.matspfeiffer.dev"&gt;Portfolio&lt;/a&gt; &amp;lt;&amp;lt; build with concave&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>ui</category>
    </item>
  </channel>
</rss>
