<?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>Forem: St3l</title>
    <description>The latest articles on Forem by St3l (@stel).</description>
    <link>https://forem.com/stel</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%2F115309%2F9c106d00-2abb-4dbc-8dc6-6ca58e35865b.png</url>
      <title>Forem: St3l</title>
      <link>https://forem.com/stel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stel"/>
    <language>en</language>
    <item>
      <title>GatsbyJs: Pros and Cons</title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Tue, 05 May 2020 15:48:51 +0000</pubDate>
      <link>https://forem.com/stel/gatsbyjs-pros-and-cons-59ph</link>
      <guid>https://forem.com/stel/gatsbyjs-pros-and-cons-59ph</guid>
      <description>&lt;p&gt;Hello everybody,&lt;/p&gt;

&lt;p&gt;I'll soon start to work on a static website project using Strapi for the back-end. But I wonder if working with Gatsby for the front-end is relevant. That's why I'm looking for people's opinion/experience of Gatsby because I can't figure it out by myself... &lt;br&gt;
So, if you could help me to make my choice, it would be great :D&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>help</category>
      <category>javascript</category>
      <category>gatsby</category>
      <category>react</category>
    </item>
    <item>
      <title>A glance at... </title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Thu, 30 Apr 2020 20:02:48 +0000</pubDate>
      <link>https://forem.com/stel/a-glance-at-fpb</link>
      <guid>https://forem.com/stel/a-glance-at-fpb</guid>
      <description>&lt;p&gt;Not so long ago I started to code... &lt;/p&gt;

&lt;p&gt;One of the main issues I had was to find short posts with simple examples, just to have a general idea of what I was trying to learn. &lt;/p&gt;

&lt;p&gt;Knowing that my learning process is understanding the general idea of a concept and practising first, then diving deeper into it,I was often confronted with long and too complex posts. I'm not saying they weren't good, but they were too advanced for my level and made me raise too much questions instead of resolving the few I had - which usually were 'What is this concept ?', 'How does this concept works ?', 'How can I use it ?'.&lt;/p&gt;

&lt;p&gt;This is why the posts 'A glance at...' will try to answer at these questions, with simple examples, hoping it will help some beginners :)&lt;/p&gt;

&lt;h2&gt;
  
  
  A glance at...
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://dev.to/stel/a-glance-at-useeffect-1dhl"&gt;...useEffect&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✌️&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A glance at useEffect</title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Thu, 30 Apr 2020 19:57:24 +0000</pubDate>
      <link>https://forem.com/stel/a-glance-at-useeffect-1dhl</link>
      <guid>https://forem.com/stel/a-glance-at-useeffect-1dhl</guid>
      <description>&lt;h3&gt;
  
  
  What's useEffect for ?
&lt;/h3&gt;

&lt;p&gt;useEffect is a hook you'll need if you want to handle side effects in a functional component. &lt;/p&gt;

&lt;p&gt;Side effects are code running after React has updated the DOM.&lt;/p&gt;

&lt;h3&gt;
  
  
  An example please ?!
&lt;/h3&gt;



&lt;div class="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;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./styles.css&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="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setStyle&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#A5CE86&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;change&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#F98E72&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;useEffect&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="nx"&gt;setTimeout&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="nx"&gt;setStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&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;h1&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`${style}`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&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;button&lt;/span&gt; &lt;span class="na"&gt;onClick=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;change&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Change!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&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;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&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;h3&gt;
  
  
  Ok... what do we have here ?
&lt;/h3&gt;

&lt;p&gt;This code shows a counter. Each time you click on the button, the &lt;code&gt;count&lt;/code&gt; will increase by 1. And there's a little color changing side effect...&lt;/p&gt;

&lt;p&gt;1.The component is shown to me for the first time:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8fZLuXra--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cb17ukqfa0kb2brb37wd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8fZLuXra--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cb17ukqfa0kb2brb37wd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.After the DOM is rendered, my component run the side effect... :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;useEffect&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="nx"&gt;setTimeout&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="nx"&gt;setStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;3.... and change the value of my &lt;code&gt;style&lt;/code&gt; state:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fs2sodeB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wsdxofklnwnwilqys0rd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fs2sodeB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wsdxofklnwnwilqys0rd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.I click on the button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;change&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Change&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;button&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;5.It increases my state &lt;code&gt;count&lt;/code&gt; by &lt;code&gt;+1&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;change&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;6.React update the DOM :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0cgv4UP7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/slc6auw8kajnpdpopiyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0cgv4UP7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/slc6auw8kajnpdpopiyv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7.After the DOM is updated, my component does't run the side effect because I told him to run it only if &lt;code&gt;color&lt;/code&gt; changed, by adding a dependencies to useEffect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight jsx"&gt;&lt;code&gt;  &lt;span class="nx"&gt;useEffect&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="nx"&gt;setTimeout&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="nx"&gt;setStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;//my dependency&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can add a console.log into the &lt;code&gt;setTimeout()&lt;/code&gt; method and run the code. You will see that React run the side effect only one time thanks to the dependency. Now try to remove it, and you will see the side effect is running every time my component is updated.&lt;/p&gt;

&lt;h3&gt;
  
  
  What now ?
&lt;/h3&gt;

&lt;p&gt;It was a glance at useEffect. To dive deeper into this concept have a look at: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://reactjs.org/docs/hooks-effect.html"&gt;Reactjs documentation&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://overreacted.io/a-complete-guide-to-useeffect/"&gt;Dan Abramov's blog post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope you enjoyed this post and will close this window with a better understanding of useEffect.&lt;/p&gt;

&lt;p&gt;✌️&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Self-taught? Your strengths and weaknesses </title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Mon, 26 Nov 2018 15:27:38 +0000</pubDate>
      <link>https://forem.com/stel/self-taught-your-strength-and-weakness--1d25</link>
      <guid>https://forem.com/stel/self-taught-your-strength-and-weakness--1d25</guid>
      <description>&lt;h3&gt;
  
  
  Hello everyone !
&lt;/h3&gt;

&lt;p&gt;Today I was thinking about an update of my resumé and I started to ask myself, as a full self-taught, what are my three strong points and my three weak points. I am curious to know if you share with me the same strengths and weaknesses :&lt;/p&gt;

&lt;p&gt;⭐️ For those who are self-taught, what are your strong/weak points ? &lt;br&gt;
⭐️ And for those who worked with self-taught, what was their strong/weak points ?&lt;/p&gt;

&lt;p&gt;And if you are an employer, if you have two similar candidates, which one would you prefer ? The academic one or the self-taught ?&lt;/p&gt;

&lt;h4&gt;
  
  
  My strong points :
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast (and good?!) learner&lt;/strong&gt; :
I don't know if it's because I am self-taught that I learn fast but I know that helped me a lot. When I started my first job I didn't coded a lot with JS and I had to learn how to code with React JS within two months.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Independent&lt;/strong&gt; : 
Being self-taught helps you to learn to find informations, documentations, and answers to your problems by yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Being self-taught shows your motivation and curiosity&lt;/strong&gt; :
It is obvious that you are motivated and curious, otherwise you would not be here ;) &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  My weak points :
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not being surrounded by a large community of developer&lt;/strong&gt; :
It is complicated (not unrealizable at all!) to find a community of developer to exchange.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not having the good vocabulary&lt;/strong&gt; : 
Sometimes when I speak with another developers, they asked me if I know about this or that and I say "no". But when they explain me what it is, I realize I know this concept/subject but I didn't know how to name it. I think this is because when you learn by yourself you don't communicate enough about what you learned, you don't memorize correctly all the vocabulary (having few years of professional experience help to naming correctly things).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Independent&lt;/strong&gt; :
This is also a weak point. Indeed, you are used to do everything by yourself and you forget that sometimes, asking for help it is essential to be productive and to improve your knowledge...&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
      <category>selftaught</category>
      <category>career</category>
    </item>
    <item>
      <title>What did you have to learn ?</title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Wed, 21 Nov 2018 12:25:34 +0000</pubDate>
      <link>https://forem.com/stel/what-did-you-have-to-learn--7he</link>
      <guid>https://forem.com/stel/what-did-you-have-to-learn--7he</guid>
      <description>&lt;p&gt;What did you have to learn for your job but did not interest you? How did you learn it ? Do you enjoy this knowledge now ?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>A little trick to left align last row's items with Flexbox</title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Tue, 20 Nov 2018 21:29:13 +0000</pubDate>
      <link>https://forem.com/stel/a-little-trick-to-left-align-items-in-last-row-with-flexbox-230l</link>
      <guid>https://forem.com/stel/a-little-trick-to-left-align-items-in-last-row-with-flexbox-230l</guid>
      <description>&lt;p&gt;For my first article here I wanted to share with you a little trick I have learned few months ago. &lt;/p&gt;

&lt;p&gt;For those who, like me, loves working with Flexbox, you have probably encountered in the past the problem of items in the last row who don't behave quite well. Meaning by that, they don't have a left align : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d9qewvi1xo1b1wp0gu8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d9qewvi1xo1b1wp0gu8.png" alt="first_picture" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Very unsatisfying isn't it ?&lt;/p&gt;

&lt;p&gt;Well, there is a very simple way to have a perfect left alignment with a simple html property: &lt;strong&gt;aria-hidden&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;This property will indicate that the element as well as its children will not be visible nor perceivable by the user or the reader. &lt;a href="https://www.w3.org/WAI/PF/aria/states_and_properties#aria-hidden" rel="noopener noreferrer"&gt;For more informations you can go on the W3 website &lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So here some simple html to create those beautiful blue squares up there : &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkwmd9nubrwrnozjqd7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkwmd9nubrwrnozjqd7z.png" alt="second_picture" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see I have six empty divs to create the squares and below three &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; tags with the aria-hidden property sets to "true".&lt;/p&gt;

&lt;p&gt;These &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; tags correspond to the square elements I might need to complete the last row. To be clearer, my rows are made up of four elements. If you don't know how many elements you will have in your rows, you can however know that you will have at least one element in the last row. So, you'll need as many &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; tags as there is places in your row, minus one.&lt;/p&gt;

&lt;p&gt;Now, we need some css :&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdmv24xp5i9copwjxmym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdmv24xp5i9copwjxmym.png" alt="third_picture" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, I gave to the container of my rows different Flexbox properties including &lt;code&gt;justify-content: center&lt;/code&gt;. But this trick works with others values like &lt;code&gt;space-between&lt;/code&gt; or &lt;code&gt;space-around&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Look at my items. I gave them a &lt;code&gt;width and an height of 250px&lt;/code&gt; as well as &lt;code&gt;margins of 20px&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The important thing here is that you have to give to your &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; tags the same width, height and margins as your items.&lt;/p&gt;

&lt;p&gt;And finally, TADAAA!!! A perfect left align ;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhn31ed7m0nklxe99dfqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhn31ed7m0nklxe99dfqb.png" alt="fourth_picture" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>flexbox</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I am also an art historian. Ask Me Anything!</title>
      <dc:creator>St3l</dc:creator>
      <pubDate>Tue, 20 Nov 2018 12:15:02 +0000</pubDate>
      <link>https://forem.com/stel/i-am-also-an-art-historian-ask-me-anything-19i3</link>
      <guid>https://forem.com/stel/i-am-also-an-art-historian-ask-me-anything-19i3</guid>
      <description>&lt;p&gt;I started my adult life with Art History. I am now a front-end developer. And guess what ?! Those two worlds are not as different as we think ;)&lt;/p&gt;

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