<?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: Mikko Vuorinen</title>
    <description>The latest articles on DEV Community by Mikko Vuorinen (@mvuorinen).</description>
    <link>https://dev.to/mvuorinen</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%2F361201%2Fae059900-638d-4a41-ac05-bf9eeefd32e3.png</url>
      <title>DEV Community: Mikko Vuorinen</title>
      <link>https://dev.to/mvuorinen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mvuorinen"/>
    <language>en</language>
    <item>
      <title>Comparing React/Vue/Angular "Getting Started" experience - Building and Composing Components</title>
      <dc:creator>Mikko Vuorinen</dc:creator>
      <pubDate>Sun, 28 Jun 2020 15:36:31 +0000</pubDate>
      <link>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-building-and-composing-components-3hee</link>
      <guid>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-building-and-composing-components-3hee</guid>
      <description>&lt;p&gt;This series compares my "getting started" experience and initial impressions of using React, Vue and Angular as a web developer already familiar with typescript and some frameworks. In this post I go through creating and composing components.&lt;/p&gt;




&lt;p&gt;The series consists of the following posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-1-website-and-documentation-2g63"&gt;The website and documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;2) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-setting-up-the-application-3dkj"&gt;Setting up the first project&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;3) Building and composing components &amp;lt;-- You're here&lt;/li&gt;
&lt;li&gt;4) Handling data and interactions -- (coming soon)&lt;/li&gt;
&lt;li&gt;5) Tooling support -- (coming soon)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Building and Composing Components
&lt;/h1&gt;

&lt;p&gt;Most modern front-end web development can be described as component-oriented, but when it comes to implementation, the common ground is very small. Initiatives like &lt;a href="https://www.webcomponents.org/"&gt;web components&lt;/a&gt; have limited support in the most popular frameworks, and each framework has it's own flavour of components. In fact, it's probably one of the most important features to consider when deciding which framework to adopt.&lt;/p&gt;

&lt;p&gt;Although components look very different in different frameworks, there is really no approach that is the best for all situations. Most of the time it's a matter of preference, but when deciding between frameworks, experience with multiple options is extremely valuable.&lt;/p&gt;

&lt;p&gt;The application I'm building with each of the three frameworks is a wishlist services I named Listr. Visitors see a page that has a list of items, and they can reserve items or cancel their reservation. The idea is based on an existing service I have built and maintained. Links to the repositories are on each of the sections.&lt;/p&gt;

&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;, a component is a function that returns a representation of the component's view. With a &lt;a href="https://reactjs.org/docs/introducing-jsx.html"&gt;JSX&lt;/a&gt; extension to JavaScript, this representation can use a combination of HTML-like syntax and JavaScript expressions.&lt;/p&gt;

&lt;p&gt;Using classes to define components in React is also possible. Because of my &lt;a href="https://aurelia.io"&gt;Aurelia&lt;/a&gt; background, I initially tried using the class syntax, but I soon realised that classes don't fit in well with React's approach. React limits the way objects and their state can be used, and classes don't behave the way I would expect them to. In my view it's better to use the function syntax.&lt;/p&gt;

&lt;p&gt;React style for defining components as a function starts to feel natural fairly quickly. The structure itself is simple and straightforward, and coding is very slick thanks to great support provided by VS Code. There are several times when I need to google how TypeScript fits into the picture.&lt;/p&gt;

&lt;p&gt;Creating component hierarchies is definitely one of the strong points in React, especially when using JSX syntax. Before trying it myself, I was quite sceptical about writing HTML in JavaScript, but with the right tooling, it's far from the string concatenation and escape character mess that I thought it might be.&lt;/p&gt;

&lt;p&gt;Child components are defined as HTML-like elements in the return value of the component function. Below is an example of an Item-component that shows the item label, number of reservations, and two child components that represent buttons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Item&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;FunctionComponent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ItemProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;listr-item&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;listr-item-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;listr-item-count&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reservedCount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/{props.item.count}&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ReserveButton&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;CancelButton&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Creating more complex structures within the component view is very easy because it can be done by using JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;listr-list&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Item&lt;/span&gt;
                &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;))}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In short, creating components is where React is at its best. At this point, I'm starting to like writing React quite a bit, and looking forward to learn more!&lt;/p&gt;

&lt;p&gt;Source code: &lt;a href="https://github.com/vuorinem/listr-react/tree/master/src/list"&gt;Listr components in React&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Vue.js
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://vuejs.org/"&gt;Vue.js&lt;/a&gt; components are a step closer to the MVVM style that I'm more familiar with. Although components can be written in one file, there is a separate view template and a script part (let's call it "view model").&lt;/p&gt;

&lt;p&gt;The template syntax is fairly easy to follow, but documentation is needed to know how to handle ifs and loops and the like. Some of the small details are not intuitively clear, for example the restriction that &lt;code&gt;{{}}&lt;/code&gt; cannot be used inside HTML attributes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"listr-list"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{{ name }}&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"!!list"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;Item&lt;/span&gt;
        &lt;span class="na"&gt;v-for=&lt;/span&gt;&lt;span class="s"&gt;"(item, index) in list.items"&lt;/span&gt;
        &lt;span class="na"&gt;v-bind:key=&lt;/span&gt;&lt;span class="s"&gt;"index"&lt;/span&gt;
        &lt;span class="na"&gt;v-bind:item=&lt;/span&gt;&lt;span class="s"&gt;"item"&lt;/span&gt;
        &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The most confusing part with Vue components when starting to build the first view model is that there are several different styles to pick from. The Vue CLI generated the template using the class syntax and &lt;code&gt;@Component&lt;/code&gt; decorator, but the documentation only shows the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This makes following the documentation sometimes a bit difficult, especially when TypeScript comes into the picture as well.&lt;/p&gt;

&lt;p&gt;There is also significantly more boilerplate code required for defining comonents in Vue. For example, all child components need to be defined in the parent component definition in the &lt;code&gt;components&lt;/code&gt; property of the decorator. Defining component properties requires a default value in the &lt;code&gt;@Prop&lt;/code&gt; decorator to work, as the standard property default value will not work as expected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Item&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;List&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Prop&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Source code: &lt;a href="https://github.com/vuorinem/listr-vuejs/tree/master/src/list"&gt;Listr components in Vue.js&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://angular.io/"&gt;Angular&lt;/a&gt; is still very loyal to its MVVM roots. Roughly speaking, the HTML template of a component represents the view, and the TypeScript part is the viewmodel. There is a lot of boilerplate code required to create a component, but well defined conventions and the CLI generators built around them mean that a lot of that can be automatically generated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-item&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./item.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;ItemComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ItemData&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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



&lt;p&gt;Angular components are defined as TypeScript classes, and follow the object-oriented programming style much more closely than React or Vue. There are some additional JS decorators that are needed to give classes and properties specific meaning, but it's quite straightforward to design an Angular application using classes and object. Even inheritance can be used, to some extent. This seems to me one of the most prominent differences between Angular and the other two frameworks, and I think it should play a key role when making the decision. Angular seems to be in this sense much closer to Aurelia.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"listr-list"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{{ name }}&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;*ngIf=&lt;/span&gt;&lt;span class="s"&gt;"!!list"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;app-item&lt;/span&gt;
      &lt;span class="na"&gt;*ngFor=&lt;/span&gt;&lt;span class="s"&gt;"let item of list.items"&lt;/span&gt;
      &lt;span class="na"&gt;[item]=&lt;/span&gt;&lt;span class="s"&gt;"item"&lt;/span&gt;
      &lt;span class="na"&gt;(reserve)=&lt;/span&gt;&lt;span class="s"&gt;"handleReserve($event)"&lt;/span&gt;
      &lt;span class="na"&gt;(cancel)=&lt;/span&gt;&lt;span class="s"&gt;"handleCancel($event)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/app-item&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Using components and composing structures in Angular templates is quite easy, but one of my main complaints about Angular is the template syntax. There are several different ways of adding bindings or logic into the template, and they all seem to use different syntax. A very simple example already uses &lt;code&gt;{{data}}&lt;/code&gt; for displaying data and &lt;code&gt;*attr&lt;/code&gt;, &lt;code&gt;(attr)&lt;/code&gt; and &lt;code&gt;[attr]&lt;/code&gt; in the element attribute names. In my opinion, this makes the HTML template look messy and difficult to see the underlying structure.&lt;/p&gt;

&lt;p&gt;On the other hand, the code in viewmodels is quite easy to follow without extensive experience using Angular. Being natively TypeScript is a big plus in my books, and core interfaces can be used to help with ensuring correct usage of the framework. The code is more verbose, especially when comparing to React, but it seems to be easier to separate the framework-dependent parts from the application logic.&lt;/p&gt;

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

&lt;p&gt;Components are used in a similar way in React, Vue.js and Angular, but each have their own take on how the component view and logic is defined. A simplified way of putting it is to say that React is more functional, Angular is more object oriented, and Vue is in between. The reality is much more complex than that, but based on my initial experience with the three, I think it's not completely untrue.&lt;/p&gt;




&lt;p&gt;Thank you for reading! If you have any feedback or questions, please leave a comment below. I would love to hear others' experiences on the subject.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>angular</category>
      <category>vue</category>
      <category>react</category>
    </item>
    <item>
      <title>Comparing React/Vue/Angular "Getting started" experience - Setting up the application</title>
      <dc:creator>Mikko Vuorinen</dc:creator>
      <pubDate>Sun, 24 May 2020 15:16:45 +0000</pubDate>
      <link>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-setting-up-the-application-3dkj</link>
      <guid>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-setting-up-the-application-3dkj</guid>
      <description>&lt;p&gt;This series compares my "getting started" experience and initial impressions of using React, Vue and Angular as a web developer already familiar with typescript and some frameworks. In this post, I will look into setting up the project structure.&lt;/p&gt;




&lt;p&gt;The series consists of the following posts:&lt;/p&gt;

&lt;p&gt;1) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-1-website-and-documentation-2g63"&gt;Intro + The website and documentation&lt;/a&gt;&lt;br&gt;
2) Setting up the application &amp;lt;-- You're here&lt;br&gt;
3) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-building-and-composing-components-3hee"&gt;Building and composing components&lt;/a&gt;&lt;br&gt;
4) Handling data and interactions -- (coming soon)&lt;br&gt;
5) Tools for running and debugging -- (coming soon)&lt;/p&gt;
&lt;h1&gt;
  
  
  Setting up the application
&lt;/h1&gt;

&lt;p&gt;Most front-end frameworks have several different ways of setting up a new project. That makes sense, because the project set up is one of the development aspects that can have vastly different requirements depending on the context.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Newcomers are usually looking for easy set up that doesn't require learning which transpiler, pre-processor or bundler to use.&lt;/li&gt;
&lt;li&gt;Companies with numerous systems depending on the framework will appreciate tools for quick scaffolding, maintenance and upgrading.&lt;/li&gt;
&lt;li&gt;Products built on the framework might require heavy customization to mold the set up to fit its needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My approach to the comparison is mostly the one of a newcomer to the framework, with previous experience from other frameworks and web development in general, and an additional requirement to use &lt;a href="https://www.typescriptlang.org/" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt;. The goal is to get a complete, working application as quickly as possible, so I don't spend much time on online playgrounds like &lt;a href="https://codesandbox.io/" rel="noopener noreferrer"&gt;CodeSandbox&lt;/a&gt; or &lt;a href="https://stackblitz.com/" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;p&gt;React documentation first suggests using a no-tool approach for setting up the application, by using a script-tag that directly links the website to the &lt;a href="https://reactjs.org/docs/cdn-links.html" rel="noopener noreferrer"&gt;CDN used by React&lt;/a&gt;. Although not suitable for my use (as I need tooling for TypeScript anyway, and want to take advantage of React typings), it is a really quick and easy way to start using React. But for anyone planning to use that in production, I strongly suggest to look into &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity" rel="noopener noreferrer"&gt;subsource integrity&lt;/a&gt; for improved security.&lt;/p&gt;

&lt;p&gt;The recommended approach for &lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt; application set up in my case seems to be the &lt;a href="https://create-react-app.dev/" rel="noopener noreferrer"&gt;Create React App&lt;/a&gt; tool. When using TypeScript, I need to look a bit further in the Create React App documentation, but the process is still very simple. All I need to do is to run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-creact-app MyApp --template typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a project with the structure that you can see on my &lt;a href="https://github.com/vuorinem/listr-react/tree/02ea172bef73d06b20df386f1de4b9216fcf484b" rel="noopener noreferrer"&gt;example project repository after scaffolding&lt;/a&gt;. It looks very neat, with most of the configuration hidden behind the &lt;em&gt;react-scripts&lt;/em&gt; dependency. Having the scripts as a dependency also makes upgrading them much easier.&lt;/p&gt;

&lt;p&gt;Documentation for this and other options for setting up a project is excellent. The Create React App documentation is on a separate website, but the main documentation has a link to it (although to the github repository instead of the website, which I find a bit odd). In addition to how-to instructions, the documentation also explains the structure of the application that is created.&lt;/p&gt;

&lt;p&gt;Once the project is set up, it can be run from command line with the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will start the development server at &lt;a href="http://localhost:3000/" rel="noopener noreferrer"&gt;localhost:3000&lt;/a&gt;, and open the browser to that location.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vue.js
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js&lt;/a&gt; as well, the CLI approach is not recommended for beginners, and the documentation suggests using a script-tag that links to a public CDN. As I mentioned earlier, this doesn't really suit my purpose, but is nice to have as an option.&lt;/p&gt;

&lt;p&gt;The documentation for my preferred approach however is not quite as straightforward as I would like. It goes straight into details about different builds, module formats, and shows examples of configuring bundlers. My experience of configuring Webpack is enough to know that I don't want any more of it, so I make my way to the &lt;a href="https://cli.vuejs.org/" rel="noopener noreferrer"&gt;vue-cli website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Vue CLI instructions for creating a new project are more to the point. The home page has all I need to create a project, and the manual and reference has more in-depth information. There are a lot of similarities with Create React App, but the documentation makes the Vue CLI seem somewhat more complicated.&lt;/p&gt;

&lt;p&gt;Creating an application with Vue CLI requires first installing the CLI as a global tool, and then using it to scaffold a new application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --global @vue/cli
vue create myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This brings up a menu that lets you configure the project. Making the correct choices might be a bit difficult without at least a bit of prior knowledge about Vue. To set up a project for TypeScript, I need to select the option to &lt;em&gt;Manually select features&lt;/em&gt;, which takes me to a stage where I have to pick what I want from the following list:&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%2Fejxa04cwah4dtc5j16zd.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%2Fejxa04cwah4dtc5j16zd.png" alt="Vue CLI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Afterwards, I need to choose whether I want to use "class-style component syntax", if I want to use Babel alongside TypeScript, and pick a linter and its additional features. I don't really know at this point what I will need in the project, and I'm not sure if those can be added later, so this makes using the CLI a bit confusing.&lt;/p&gt;

&lt;p&gt;Once I settle on a set of features that sounds reasonable, the CLI creates the application structure as seen in &lt;a href="https://github.com/vuorinem/listr-vuejs/tree/4cad84d1291e85989a17b37931297238305f5705" rel="noopener noreferrer"&gt;my Vue application&lt;/a&gt;. It's fairly clean, with few simple configuration files. It's not quite as simple as the React one, and there are more direct dependencies in &lt;code&gt;package.json&lt;/code&gt;, but most of the complicated configuration files are hidden behind the scenes.&lt;/p&gt;

&lt;p&gt;Vue application can be started by running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a development build and show the URL &lt;a href="http://localhost:8080/" rel="noopener noreferrer"&gt;localhost:8080&lt;/a&gt; where the application is running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular
&lt;/h2&gt;

&lt;p&gt;Unlike the other two frameworks, &lt;a href="https://angular.io" rel="noopener noreferrer"&gt;Angular&lt;/a&gt; points directly to the &lt;a href="https://angular.io/cli" rel="noopener noreferrer"&gt;Angular CLI&lt;/a&gt; for creating a new project. To install the CLI and run the tool to create a new project, following commands are needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --global @angular/cli
ng new myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tool shows some options for the new project, for example whether to use routing or not, and which CSS precompiler to use, but nothing that requires specific Angular knowledge. A lot of the choises have already been made for you when using Angular. One of the main ones is the choice to use TypeScript.&lt;/p&gt;

&lt;p&gt;As you can see from &lt;a href="https://github.com/vuorinem/listr-angular/tree/72b206d9942924235934e2d1316dabe5b793610f" rel="noopener noreferrer"&gt;my Angular application repository&lt;/a&gt;, there are considerably more configuration files and boilerplate code in the Angular project folder when compared to React or Vue. The development cycle relies heavily on the CLI to make the configuration easier to handle and to reduce the manual work for component scaffolding. These are some of the things that make Angular a more opinionated framework. Many common tasks are simplified in Angular by using "the Angular way" of doing them.&lt;/p&gt;

&lt;p&gt;Running the application on a development environment is done through the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This starts up the application at &lt;a href="http://localhost:4200/" rel="noopener noreferrer"&gt;localhost:4200&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;That's it, I now have a new project running on each of the three frameworks. Thanks for reading, I hope you found this article useful. If you have any comments or questions, please don't hesitate to ask. Next time I will concentrate on creating a new component, focusing more on the code.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>vue</category>
      <category>angular</category>
    </item>
    <item>
      <title>Comparing React/Vue/Angular "Getting started" experience - Website and documentation</title>
      <dc:creator>Mikko Vuorinen</dc:creator>
      <pubDate>Sun, 10 May 2020 00:47:55 +0000</pubDate>
      <link>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-1-website-and-documentation-2g63</link>
      <guid>https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-1-website-and-documentation-2g63</guid>
      <description>&lt;p&gt;This series compares my "getting started" experience and initial impressions of using React, Vue and Angular as a web developer already familiar with typescript and some frameworks. In this post, I will take a look at the websites and documentation.&lt;/p&gt;




&lt;p&gt;The three most popular front-end web frameworks at the moment are most likely(*) React, Angular and Vue. My experience of modern JavaScript frameworks is mainly on &lt;a href="https://aurelia.io/" rel="noopener noreferrer"&gt;Aurelia&lt;/a&gt;. I have been following the scene and listening to talks and podcasts about React and Vue, and used AngularJS few years back, but until now I haven't actually tried using any of the three.&lt;/p&gt;

&lt;p&gt;In this series of posts, I compare the initial experience of using React, Vue and Angular, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1) The website and documentation &amp;lt;-- You're here&lt;/li&gt;
&lt;li&gt;2) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-setting-up-the-application-3dkj"&gt;Setting up the first project&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;3) &lt;a href="https://dev.to/mvuorinen/comparing-react-vue-angular-getting-started-experience-building-and-composing-components-3hee"&gt;Building and composing components&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;4) Handling data and interactions -- (coming soon)&lt;/li&gt;
&lt;li&gt;5) Tools for running and debugging -- (coming soon)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of following tutorials or copying sample code, I will take an approach that feels more practical from my perspective. I will figure out how to solve several technical problems in a business context that I'm familiar with. This allows me to compare the features of the three frameworks as well as how easy they are to learn while solving the problem at the same time. I use &lt;a href="https://www.typescriptlang.org" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt; and &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;, as I would when working on an actual project.&lt;/p&gt;

&lt;p&gt;*) See for example &lt;a href="//2019.stateofjs.com"&gt;The State of JavaScript 2019&lt;/a&gt; and &lt;a href="https://dev.totop-javascript-frameworks-and-topics-to-learn-in-2020-and-the-new-decade-ced6e9d812f9"&gt;Top JavaScript Frameworks and Topics to Learn in 2020 and the New Decade&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Websites
&lt;/h1&gt;

&lt;p&gt;Although the website of the framework might not be the most exciting aspect to compare, it is nonetheless an important one. The quality of the documentation and the website makes a big difference when trying a framework for the first couple of times, and later when finding solutions for more specific problems. The documentation experience can easily be the thing that tips the scales when deciding whether a specific framework is for me or not.&lt;/p&gt;

&lt;p&gt;Below is my personal experience using the website of each of the frameworks during this series, but the goal is to bring up details that are useful for others in a similar situation.&lt;/p&gt;

&lt;h2&gt;
  
  
  React
&lt;/h2&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%2F0pr6zvcwb4xtgfa3lo4s.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%2F0pr6zvcwb4xtgfa3lo4s.png" alt="React homepage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt; has an excellent website in all the ways I can think of. The home page has clear buttons to get started with coding or learning,  links to documentation and other resources, a bit of information about React, and interactive code samples for the key features.&lt;/p&gt;

&lt;p&gt;The React website has two sets of tutorials, one for &lt;a href="https://reactjs.org/tutorial/tutorial.html" rel="noopener noreferrer"&gt;learning by doing&lt;/a&gt; and another with a &lt;a href="https://reactjs.org/docs/hello-world.html" rel="noopener noreferrer"&gt;step-by-step guide&lt;/a&gt; to React features. The approach works well for me: I can search for best practices for specific problems from the first tutorial, and examples of using specific features from the second one. The writing style of the tutorials is very learning-oriented and easy to follow as someone new to React.&lt;/p&gt;

&lt;p&gt;The only problem with React documentation is that when using TypeScript, I often need to find other sources for examples and explanations. Luckily there are some really good resources like &lt;a href="https://react-typescript-cheatsheet.netlify.app/" rel="noopener noreferrer"&gt;React TypeScript Cheatsheets&lt;/a&gt;, and articles such as &lt;a href="https://fettblog.eu/typescript-react/" rel="noopener noreferrer"&gt;Stefan Baumgartner's series on TypeScript and React&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The tutorials and the main concepts don't mention hooks at all, so to learn about them, I have to check the &lt;a href="https://reactjs.org/docs/hooks-intro.html" rel="noopener noreferrer"&gt;Hooks-section&lt;/a&gt; of the documentation, which is all the way down after &lt;em&gt;API Reference&lt;/em&gt;. Based on what I learned after using React for a while, and with a help of a friend with more React experience, I think it is something that could be introduced earlier.&lt;/p&gt;

&lt;p&gt;The API reference on the website is not the best for searching details about a specific function in the API. But when working with React, more than a concise description of the interface, I usually needed an explanation of when and how it should be used. For that, the API reference works well.&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%2Fri8qpn5eu9v4997l50f3.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%2Fri8qpn5eu9v4997l50f3.png" alt="React website search results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search works nicely and shows the hits clearly as a preview. A working search also makes finding details from the API reference much easier, making the issues I mentioned earlier even less of a problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vue.js
&lt;/h2&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%2Fwyevs7xu8ees6o8jer0y.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%2Fwyevs7xu8ees6o8jer0y.png" alt="Vue.js homepage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js&lt;/a&gt; has a clear homepage as well, but the content is not quite as easy to navigate. The guide is a bit heavy in text, although there is also a free video course for those who prefer a more structured way to learn Vue. The video tutorial looks excellent, but it is doesn't quite fit my purpose of quickly getting familiar with specific features and best practices. The documentation also links to a &lt;a href="https://codesandbox.io/s/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-20-hello-world" rel="noopener noreferrer"&gt;CodeSandbox example&lt;/a&gt;, several &lt;a href="https://scrimba.com/" rel="noopener noreferrer"&gt;Scrimba&lt;/a&gt; lessons, and has a clever idea to use the browser console as part of the samples. Having options is really nice, but at times makes the documentation as a whole feel a bit fragmented.&lt;/p&gt;

&lt;p&gt;The styleguide is a very welcome part of the documentation, although it still leaves me uncertain of the differences between different syntax options, especially when TypeScript is thrown into the picture. There is a &lt;a href="https://vuejs.org/v2/guide/typescript.html" rel="noopener noreferrer"&gt;page dedicated to TypeScript&lt;/a&gt;, but it doesn't cover everything, so sometimes I find it difficult to figure out how a sample in the documentation translates into TypeScript. Just like in React, other online articles like &lt;a href="https://alligator.io/vuejs/typescript-class-components/" rel="noopener noreferrer"&gt;Writing Class-Based Components With Vue.js and TypeScript&lt;/a&gt; come in handy.&lt;/p&gt;

&lt;p&gt;One difficulty I have with the documentation is that examples sometimes lack context. It is not always clear where the sample code should be put and in which file, especially when there are different options on how the components can be structured.&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%2F9h4otv4ct0gzmhbnn4jj.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%2F9h4otv4ct0gzmhbnn4jj.png" alt="Vue.js website search results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vue website search looks and feels very similar to the React one. I'm guessing it has something to do with the &lt;a href="https://www.algolia.com/" rel="noopener noreferrer"&gt;Algolia&lt;/a&gt; logo at the bottom.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular
&lt;/h2&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%2F4otx5vkvcq83qdogva79.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%2F4otx5vkvcq83qdogva79.png" alt="Angular website"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://angular.io/" rel="noopener noreferrer"&gt;Angular&lt;/a&gt; has a clear and informative website, with a bit more focus on showcasing the capabilities of the framework from a less technical perspective. The documentation is very thorough and covers a wide set of features and concepts, which makes sense considering that Angular itself is a more full-featured framework, whereas React and Vue are mainly focused on user interface. Similarly to the React website, there is a &lt;a href="https://angular.io/tutorial" rel="noopener noreferrer"&gt;sample-based tutorial&lt;/a&gt; and a &lt;a href="https://angular.io/guide/architecture" rel="noopener noreferrer"&gt;fundamental concepts section&lt;/a&gt;. There is also a separate tutorial for &lt;a href="https://angular.io/guide/setup-local" rel="noopener noreferrer"&gt;setting up local environment&lt;/a&gt;, and a &lt;a href="https://angular.io/generated/live-examples/getting-started-v0/stackblitz.html" rel="noopener noreferrer"&gt;complete sample application on StackBlitz&lt;/a&gt; to explore.&lt;/p&gt;

&lt;p&gt;The documentation feels very technical in some places, and uses a lot of framework-specific concepts even in the getting started tutorials. For example, this is from the beginning of introduction to the basic concepts:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The basic building blocks are &lt;em&gt;NgModules&lt;/em&gt;, which provide a compilation  context for &lt;em&gt;components&lt;/em&gt;. NgModules collect related code into functional sets; an Angular app is defined by a set of NgModules. An app always has at least a &lt;em&gt;root module&lt;/em&gt; that enables bootstrapping, and typically has many more &lt;em&gt;feature modules&lt;/em&gt;."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The page doesn't give any more details about terms like &lt;em&gt;compilation context&lt;/em&gt; or &lt;em&gt;bootstrapping&lt;/em&gt;, and the language is quite difficult to approach without at least some prior knowledge about front-end frameworks. And even with that, it takes more effort to get through when compared to the language used by the React documentation.&lt;/p&gt;

&lt;p&gt;One clear benefit of Angular documentation over the others is that all the samples are in TypeScript. This makes it much easier for me to apply them in the project, and it gives confidence that I'm using it as intended when the information comes from the framework website.&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%2Flywp6jarrr0e2eojh638.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%2Flywp6jarrr0e2eojh638.png" alt="Angular website search results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The search function on the Angular website is much less impressive than its comparisons. Although it shows the section in which the result is in, there is less context so it is more difficult to see which search result contains the needed information.&lt;/p&gt;

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

&lt;p&gt;All the three frameworks have very well thought through websites with comprehensive documentation. They cover the needs of different types of learners on different levels, and give the necessary background about the framework for those who are interested.&lt;/p&gt;

&lt;p&gt;The one that stands out for me is the React website, which has very clear navigation, writing style that is really good for learning, and tutorials that are easy to follow.&lt;/p&gt;




&lt;p&gt;Thank you for reading! In the next part of the series I will look into setting up a project.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>vue</category>
      <category>angular</category>
    </item>
  </channel>
</rss>
