<?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: David</title>
    <description>The latest articles on DEV Community by David (@davids89).</description>
    <link>https://dev.to/davids89</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%2F6414%2Fc8c172b0-b9f6-4166-9ff9-274629547293.jpg</url>
      <title>DEV Community: David</title>
      <link>https://dev.to/davids89</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davids89"/>
    <language>en</language>
    <item>
      <title>How to use PortalVue</title>
      <dc:creator>David</dc:creator>
      <pubDate>Tue, 15 Sep 2020 15:04:32 +0000</pubDate>
      <link>https://dev.to/davids89/how-to-use-portalvue-3bm7</link>
      <guid>https://dev.to/davids89/how-to-use-portalvue-3bm7</guid>
      <description>&lt;p&gt;There some many times in the development of an app that it's required to change the behaviour of a component. Nowadays, frameworks provide some many ways to overlap those components and one it's surprised me was a small package that will be included in VueJS 3, and today is named portals.&lt;/p&gt;

&lt;h1&gt;
  
  
  Play to open a portal
&lt;/h1&gt;

&lt;p&gt;Yes, if you have a little gamer culture you hear about portals and it reminds you about Valve. We can say that this works that way.&lt;/p&gt;

&lt;p&gt;PortalVue is an actual VueJS 2 plugin that let us send some components from a template to another template.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to use portals
&lt;/h1&gt;

&lt;p&gt;To install PortalVue, we only have to write on our bash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="nx"&gt;portal&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;vue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we must add the following lines to our &lt;code&gt;main.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;PortalVue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;portal-vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PortalVue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  How to send components through portals
&lt;/h1&gt;

&lt;p&gt;Ok, in our project we had troubles. We need to override the AppBar depending on the view. We are coding an Ionic app and we didn't want to use so many code for that.&lt;/p&gt;

&lt;p&gt;In our project layout view, we set up our destination portal. This is the portal used to show the content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PortalTarget&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt; &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ion-header"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;PortalTarget&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are setting a name what is the reference to send the content in the other side of the portal.&lt;/p&gt;

&lt;p&gt;When we need to show an AppBar, we only have to define it in the view and customize it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Portal&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ion&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="na"&gt;toolbar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ion&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="na"&gt;toolbar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Portal&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How you can see, it is very simple to use. According to the author, it will be available in Vue.js 3 as core functionality and renamed as &lt;code&gt;&amp;lt;Teleport /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I hope it is useful 😁&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Which e2e testing framework can I use to test a Cordova hybrid app?</title>
      <dc:creator>David</dc:creator>
      <pubDate>Thu, 02 Jul 2020 08:36:50 +0000</pubDate>
      <link>https://dev.to/davids89/wich-e2e-testing-framework-can-i-use-to-test-a-cordova-hybrid-app-55hf</link>
      <guid>https://dev.to/davids89/wich-e2e-testing-framework-can-i-use-to-test-a-cordova-hybrid-app-55hf</guid>
      <description>&lt;p&gt;Hello, we have an app with Cordova + Ionic + Vue and we are testing with Appium + Wdio, but we are having issues and we're considering to test another framework.&lt;/p&gt;

&lt;p&gt;Wich do you know to test a Cordova app?&lt;/p&gt;

</description>
      <category>testing</category>
      <category>vue</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Some many ways to ignore file changes in Git</title>
      <dc:creator>David</dc:creator>
      <pubDate>Sat, 01 Feb 2020 10:17:36 +0000</pubDate>
      <link>https://dev.to/davids89/some-many-ways-to-ignore-file-changes-in-git-4kcf</link>
      <guid>https://dev.to/davids89/some-many-ways-to-ignore-file-changes-in-git-4kcf</guid>
      <description>&lt;p&gt;When you are working with your team, sometimes you need to ignore files. If a change that involve all the team, you can add the ignored file to the &lt;code&gt;.gitignore&lt;/code&gt; file of your repo.&lt;/p&gt;

&lt;p&gt;This way you have to save a new commit and all the team have to pull the changes, but you can use three more ways.&lt;/p&gt;

&lt;p&gt;One of them is creating a &lt;code&gt;.gitignore.local&lt;/code&gt;, but you also have to add it to the &lt;code&gt;.gitignore&lt;/code&gt; and creating a new commit.&lt;/p&gt;

&lt;p&gt;If you are nos interested in save a commit, you can ignore files locally, saving the ignored file in the global git configuration:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global core.excludesfile ignored_file&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;...or you can use a file created in your git repository called &lt;code&gt;.git/info/exclude&lt;/code&gt;. This file is basically a &lt;code&gt;gitignore&lt;/code&gt; but the changes in it are not reflected in the stash.&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>What did you learn this week?</title>
      <dc:creator>David</dc:creator>
      <pubDate>Sat, 01 Feb 2020 10:07:30 +0000</pubDate>
      <link>https://dev.to/davids89/what-did-you-learn-this-week-ek</link>
      <guid>https://dev.to/davids89/what-did-you-learn-this-week-ek</guid>
      <description>&lt;p&gt;For example, I've learnt that a green test written in the past might be a false positive test today.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
