<?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: Žane Suhadolnik</title>
    <description>The latest articles on DEV Community by Žane Suhadolnik (@zasuh_).</description>
    <link>https://dev.to/zasuh_</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%2F30871%2F08e68bdd-d895-49da-b66e-84f887975803.png</url>
      <title>DEV Community: Žane Suhadolnik</title>
      <link>https://dev.to/zasuh_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zasuh_"/>
    <language>en</language>
    <item>
      <title>In defense of the Angular framework</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 01 Jun 2020 09:26:42 +0000</pubDate>
      <link>https://dev.to/zasuh_/in-defense-of-the-angular-framework-25fg</link>
      <guid>https://dev.to/zasuh_/in-defense-of-the-angular-framework-25fg</guid>
      <description>&lt;p&gt;Over the past month and a half I've been working on a single-page app with Angular. When I heard that we had to use Angular I squirmed and thought to myself 'Why? There are so many better options out there'. I like many others out there have heard stories about how Angular was completely re-written for version 2 and ruined it's reputation. I've heard that the framework is bloated, complicated and overall too large for most projects.&lt;/p&gt;

&lt;p&gt;I'm here to share my experience of being a primarily React developer, shipping React code in production to using Angular for a production application.&lt;/p&gt;

&lt;h2&gt;
  
  
  History
&lt;/h2&gt;

&lt;p&gt;This wasn't my first rodeo with the framework. For my diploma I made the same app with React, Vue and Angular in an attempt to try and compare the 3 and see if one is better than the other (all 3 are great, all 3 have flaws, there is no 'best option'). I wasn't completely unfamiliar with Angular when I started working at this current company, but I was more inclined to using React because I was just more comfortable with it. &lt;/p&gt;

&lt;p&gt;Before starting work on the new project I had a 3 days weekend and so having a more open mind I went through the Angular tutorial once again, skimming the TypeScript quick start and occasionally looking at the RxJS documentation before I started working on the project the next week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Growing pains
&lt;/h2&gt;

&lt;p&gt;Angular has a LOT of files per component. 3 at the least, one being the &lt;code&gt;.html&lt;/code&gt; or template, then the &lt;code&gt;.ts&lt;/code&gt; file for logic and a &lt;code&gt;.css&lt;/code&gt; or more likely &lt;code&gt;.sass&lt;/code&gt; file for styles. This was hell for a while untill I got used to it. Coming from React where everything is shifting to a single file component with JSX and CSS in JS, this was frustrating for the most part.&lt;/p&gt;

&lt;p&gt;At the same time however I understand that 'separation of concerns' is a good architecture choice so I have nothing to complain about. The problem does become apparent however when you have a lot of components to work on and passing data between them can get a little messy. Still, nothing someone can't get used to and understand why it's important.&lt;/p&gt;

&lt;h2&gt;
  
  
  TypeScript
&lt;/h2&gt;

&lt;p&gt;TS in Angular is not the same as TS in any other framework. It's used heavily and in way I still don't quite understand. But at the same time it was a great learning experience, because I can now write TS with no issue on any other project, which was one of my learning goals for 2020 anyway. Also you get to use it as much as you want, it's more of another 'testing' and 'linting' layer to help developers write safer and cleaner code. Throw in TSLint and the code base looks the same for all developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  RxJS
&lt;/h2&gt;

&lt;p&gt;I read somewhere that this was the most confusing and hard part of working with Angular. I maybe haven't delve deep enough into observables to actually encounter a specific thing that I find confusing because working with RxJS, the operators, subscriptions was not at all hard or confusing. &lt;br&gt;
You just subscribe to an observable like a http GET request and once the server returns data you resolve it just like you would by using a &lt;code&gt;then&lt;/code&gt; on a promise. It also provides a great deal of &lt;code&gt;operators&lt;/code&gt; to help you manipulate and edit observables without much hassle.&lt;/p&gt;

&lt;p&gt;RxJS gets a plus from me. No complaints so far, but I don't really see why I would use observables outside of Angular.&lt;/p&gt;

&lt;h2&gt;
  
  
  The complete package
&lt;/h2&gt;

&lt;p&gt;Angular isn't just a view layer where the developer can use whatever packages and modules they desire, instead it's a bit opinionated and comes with a variety of different funcionalities from routing, forms, http requests, the before mentioned RxJS and TypeScript. &lt;/p&gt;

&lt;p&gt;And this isn't a bad thing. It's a choice. Do you want to use React where you have a choice of what to use so you can be flexible and develop apps the way YOU want them to, but at the same time risking shooting yourself in the foot because you didn't account for something. The reverse goes for Angular. You have a complete package of tools that allows you to build a complete app without having to implement or think about outside solutions, but you give up some of that freedom you might have with React, which in my opinion is understandable.&lt;/p&gt;

&lt;p&gt;This is why Angular is still more popular than React in enterprise solutions, but less so in smaller communities where people want flexibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Don't limit yourself to technologies just because they aren't as popular or because you think those technologies are doing something bad, instead try them out and form your own opinions on the ecosystem and developer experience by making some small apps. Same goes for languages and other things in the technology world.&lt;/p&gt;

&lt;p&gt;Thank you for reading.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>angular</category>
      <category>framework</category>
    </item>
    <item>
      <title>Thoughts on RedwoodJS</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 06:45:19 +0000</pubDate>
      <link>https://dev.to/zasuh_/thoughts-on-redwoodjs-4ki4</link>
      <guid>https://dev.to/zasuh_/thoughts-on-redwoodjs-4ki4</guid>
      <description>&lt;p&gt;For the past few days I've been going through the &lt;a href="https://redwoodjs.com/tutorial/welcome-to-redwood"&gt;RedwoodJS tutorial&lt;/a&gt; and cookbook to see what the technology is all about, I've also listened to &lt;a href="https://fullstackradio.simplecast.com/episodes/138"&gt;Full Stack Radio's episode&lt;/a&gt; where Adam Wathan interviews the creator to better understand why it's being built and what problems it's trying to solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tutorial
&lt;/h2&gt;

&lt;p&gt;First of all I need to praise the Redwood team for putting together one of the best tutorials for a framework I've every experienced. Clear, concise paragraphs and code explained with plain English and light humour. Go through it and you will see what I'm talking about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Abstraction done the right way
&lt;/h2&gt;

&lt;p&gt;Many JAMstack frameworks are trying to abstract certain elements away from the developer so we can just focus on creating apps with the right content. Most fail and just produce a chaos of problems that you don't know how to solve, due to the fact that they are abstracted away. Redwood doesn't do that, it abstracts away just enough for to still understand whats going on.&lt;/p&gt;

&lt;p&gt;Taking for instance the way GraphQL + Apollo Client work with Prisma. I was familiar with all of these technologies, but never understood them fully until going through the tutorial. Yes it is still abstraction and yes you still give a lot of control to the framework itself, but this doesn't limit you. It's opinionated in the right way in my opinion as someone who only has about 2 years professional experience in the industry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cells
&lt;/h2&gt;

&lt;p&gt;Redwood introduces the concept of 'cells' which in my mind is a thing every single framework should have out of the box. It again opinionizes a concept of how we deal with data state and what to show on the UI. If you write React code there isn't a set way of doing this, maybe you throw in some conditional statements and have to write entire components in order to make it work. &lt;/p&gt;

&lt;p&gt;Redwood presents you with 4 states (Failure, Empty, Success and Loading) where you just tell it what to render once it enters that state and this is again.. fantastic. It eliminates the need to think about how to handle these states and just gives you the option of what to present to the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Redwood CLI
&lt;/h2&gt;

&lt;p&gt;Not sure if I should call it a CLI, but Redwood goes down the path of the Angular CLI, where you can add &lt;code&gt;yarn&lt;/code&gt; workspaces through the terminal which I don't understand why it wasn't a thing with React apps before. You have generators for &lt;code&gt;layout&lt;/code&gt;, &lt;code&gt;pages&lt;/code&gt;, &lt;code&gt;components&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt; and much more. This saves time and again gives you a sort of standard how things should look in your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  React is imported everywhere
&lt;/h2&gt;

&lt;p&gt;Leaving you with this: You don't have to import React to every single component. Again, I don't know how this wasn't already solved in the past, why would I need to import 'react' into every single component or page I make? With Redwood you just generate your app and start writing JSX code. You still have to import stuff like &lt;code&gt;useState&lt;/code&gt;, but this is a welcome edition.&lt;/p&gt;

&lt;p&gt;Those are my thoughts on RedwoodJS. I'm excited to see where it goes in the future and what it will bring to the table, it's currently still in an alpha stage so don't go building production apps with it just yet. Play around and see for yourself why I and a lot of other people like it.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>react</category>
      <category>redwoodjs</category>
      <category>graphql</category>
      <category>prisma</category>
    </item>
    <item>
      <title>A post about productivity</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:52:38 +0000</pubDate>
      <link>https://dev.to/zasuh_/a-post-about-productivity-407g</link>
      <guid>https://dev.to/zasuh_/a-post-about-productivity-407g</guid>
      <description>&lt;p&gt;If you have a programming blog you have to write a post about programmer productivity. It's kind of like a ritual to be accepted into the pantheon of programming bloggers (next to writing your opinion on the industry and how it has changed as a whole).&lt;/p&gt;

&lt;p&gt;Productivity in programming is weird when you are starting out. You think that you aren't making any progress when you just play around with HTML and CSS, because those aren't ReAlll programming languages, when in reality you are learning the basics for whats to come. You can't properly learn how to make web apps with just JS because eventually you are gonna run into some problem that requires HTML or CSS knowledge at a much deeper level. So you are making progress I assure you.&lt;/p&gt;

&lt;p&gt;The type of productivity I'm referring to is how to properly get something done that you have set out to do and not spend hours just watching tutorials. What I'm saying is that to me &lt;strong&gt;productivity is when you are actively moving towards a goal&lt;/strong&gt;. You don't have to consistently move towards the goal, yes it is prefered, but not necessary as long as you are moving. There is this great quote that I don't know the source of anymore, but it says &lt;strong&gt;It's much easier to steer a moving train than a not moving train&lt;/strong&gt;. Once you have some momentum towards the goal all you have to keep doing is correcting your path to the finish line.&lt;/p&gt;




&lt;p&gt;Taking development as an example. It takes ages for someone that hasn't programmed before to actually become really productive, but they are still productive in some sense. They are learning and learning takes a very long time to make into production of value. And that sucks, but it sucks all the time because we as developers are always learning and consiquently always feeling like shit because we don't 'know' enough. It's something that comes with the job.&lt;/p&gt;

&lt;p&gt;Here are a few things I've learned to make me more productive in the work environment :&lt;/p&gt;

&lt;h3&gt;
  
  
  Having a list of tasks
&lt;/h3&gt;

&lt;p&gt;I was using Trello for the longest time as the default home for all my tasks that I had to do at work. It quickly became clear that Trello was no working, because tasks were always changing and I was being switched to different projects all the time, making it difficult to constantly change Trello entries. Instead I actually downgraded to a regular A4 piece of paper, where I write the project name at the top and then tasks that need to be done. I cross them out once the tasks are done and it makes it easier to draw out UI requirements and make diagrams for easier understanding.&lt;br&gt;
Also one of the reasons why I use paper is because we don't do development on laptops and making notes on my phone is just annoying at meetings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding the importance of a task
&lt;/h3&gt;

&lt;p&gt;Using the &lt;a href="https://appfluence.com/productivity/what-is-the-eisenhower-method/"&gt;Eisenhower method&lt;/a&gt; you should go over your tasks and decide their priority. If you have 2 critical and important tasks, analize both and figure out which one will take the longest and do that one first. This sounds easier said than done, because a lof of the time you can't really know how long it will take you to finish a task, since programming can have a lot of unexpected bumps in the road. Plan accordingly and if the task completion time goes into the red, talk to your manager about getting some extend time since it's in everyones best interest to have work done at the end of the day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Knowing when you can get the most done
&lt;/h3&gt;

&lt;p&gt;For me mornings are the most productive times of the day. I love programming in the morning with a cup of coffee by my side, the earlier the better. That comes at a cost though. I just can't be as productive after lunch as I am in the morning, I feel like crap, no concentration, irritated and want to go home. It's just the way I'm wired, but I have to force myself to do work untill about 4-5pm. Management doesn't care if you can't programm after 2, stuff needs to get done. So know yourself enough to know when to schedule the most important and hard tasks for the day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slow down
&lt;/h3&gt;

&lt;p&gt;This is something I'm working on myself, but hear me out. &lt;strong&gt;Do everything 25% slower&lt;/strong&gt;. Why? Well you can do &lt;strong&gt;10%&lt;/strong&gt; the point is to slow down. Programming and development is a tricky thing and small mistakes because of rushing happen all the time. So slow down, check what that function is doing, do you have all cases handled and test the shit out of it, so you can be certain when push to production happens you didn't make a simple mistake because you were rushing. For me it helps to really think about the problem and solution before diving in and solving it. You can't predict everything that might break your system, but slowing down might cause you to see something you otherwise wouldn't if you were just rushing through.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>work</category>
    </item>
    <item>
      <title>JavaScript Higher Order Functions</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:51:24 +0000</pubDate>
      <link>https://dev.to/zasuh_/javascript-higher-order-functions-21lp</link>
      <guid>https://dev.to/zasuh_/javascript-higher-order-functions-21lp</guid>
      <description>&lt;p&gt;I don't think I ever got any more gittier than the time I figured out ways on how to manipulate, change and construct Arrays and Objects. It was one of the best revelations in my JS learning career and are essential for understanding modern Javascript. So I thought I would explain some of the ones I actually understand and use on a daily basis.&lt;/p&gt;

&lt;p&gt;When do you use them? An example of of the top of my head is when an API returns a JSON object in a certain structure that doesn't work with how your component renders data. In this case you would take the returned API data and transform it with let's say &lt;code&gt;map&lt;/code&gt; to create a new array that suits your component render.&lt;/p&gt;




&lt;h3&gt;
  
  
  MAP
&lt;/h3&gt;

&lt;p&gt;I've looked at a lot of other peoples code over the years and the use of &lt;code&gt;map&lt;/code&gt; is large. So what is it, except a higher order function? Well &lt;code&gt;map&lt;/code&gt; loops over an array and returns a new array is the simplest answer I can give. It takes a callback function as a parameter, which itself takes a parameter (I usually go with the naming of &lt;code&gt;item&lt;/code&gt; to reference the current item in the array) referencing the current value of the array and the second parameter being the index at which that value is held.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;arr&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;//12, 24, 36, 48, 60, 72&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="c1"&gt;//0, 1, 2, 3, 4, 5&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The beauty of higher order functions such as map is using them is pure functional programming so you can continue appending other functions at the end of &lt;code&gt;map&lt;/code&gt; for instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;arr&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;//12, 24, 36, 48, 60, 72&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="c1"&gt;//0, 1, 2, 3, 4, 5&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nx"&gt;filter&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="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&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;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt; &lt;span class="c1"&gt;//filters out all numbers that are lower than 12&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or something regarding react state and mapping into a new object to later use in render:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://example.com/movies.json&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="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&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="c1"&gt;//Response is [ {id:1, name:First Name}, {id:2, name:Second Name}, {id:3, name:Third Name} ]&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;fieldsForComponent&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;response&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="o"&gt;=&amp;gt;&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="na"&gt;id&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;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                &lt;span class="na"&gt;name&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;name&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="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  FILTER
&lt;/h3&gt;

&lt;p&gt;We briefly used the &lt;code&gt;filter&lt;/code&gt; function in an above example. What is it? It's another higher order function that filters the passed data structure based on the test you provide in the callback function. So you might use it with &lt;code&gt;if..else&lt;/code&gt; statements often.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aaa&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bbbb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ccccc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&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="k"&gt;if&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;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="c1"&gt;//0, 1, 2&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The callback in the &lt;code&gt;filter&lt;/code&gt; function takes the parameters of the &lt;strong&gt;current item in the array&lt;/strong&gt;, &lt;strong&gt;the index of the item&lt;/strong&gt; and it can also take the &lt;strong&gt;array object on which the filter is being made&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  FOREACH
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;forEach&lt;/code&gt; is one of my most used functions when it comes to arrays. At first sight it looks the same as &lt;code&gt;map&lt;/code&gt; with the exception that &lt;code&gt;map&lt;/code&gt; creates a brand new array which you usually have to assign back to the original array, whereas &lt;code&gt;forEach&lt;/code&gt; mutates the existing array, changing it's structure and values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&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="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//10, 20, 30&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//[10, 20, 30]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same as &lt;code&gt;filter&lt;/code&gt; &lt;code&gt;forEach&lt;/code&gt; takes as parameters &lt;strong&gt;current item in the array&lt;/strong&gt;, &lt;strong&gt;the index of the item&lt;/strong&gt; and it can also take the &lt;strong&gt;array object on which the loop is being made&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  OBJECT.KEYS / OBJECT.VALUES
&lt;/h3&gt;

&lt;p&gt;Moving on to Object manipulation for a bit are two very useful ways to get objects to where you want them. &lt;code&gt;Object.keys&lt;/code&gt; is useful for when you want to treat your object like it's an array and you don't want to do some complex converting code to make that happen. For instance: you want to use map on a data structure, but your structure is an Object. You simply use &lt;code&gt;Object.keys(yourObject).map()&lt;/code&gt; or &lt;code&gt;Object.keys(yourObject).filter()&lt;/code&gt;. Why? Because it creates an ARRAY of your keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;somestring&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//["1", "2", "3"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Object.values()&lt;/code&gt; is the same thing only with the values of the object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;somestring&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//['somestring', 42, false]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And yes both of these return the &lt;code&gt;keys&lt;/code&gt; and &lt;code&gt;values&lt;/code&gt; in the same order as they are written in the initial object.&lt;/p&gt;

&lt;h3&gt;
  
  
  OBJECT.ENTRIES
&lt;/h3&gt;

&lt;p&gt;To combine both &lt;code&gt;Object.keys()&lt;/code&gt; and &lt;code&gt;Object.values()&lt;/code&gt; we have &lt;code&gt;Object.entries()&lt;/code&gt;. It again returns an array, but this time with the [key, value] pairs. This method does not return the new array in the same order tho, for that you have to sort the array yourself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;somestring&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//[[1, 2, 3], ['somestring', 42, false]] -&amp;gt; ORDER NOT GUARANTEED &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  OBJECT.ASSIGN
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Object.assign()&lt;/code&gt; uses two objects and combines them together. That was a really oversimplified answer since there is a lot more that goes on under the hood, but generally that is the target solution this method is going for. You have a &lt;code&gt;target&lt;/code&gt; object, so the object you want to copy into and a &lt;code&gt;source&lt;/code&gt; object which is the object that is copied to the &lt;code&gt;target&lt;/code&gt; object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;b&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;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;d&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;returned&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;returned&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//{1:a, 2:b, 3:c, 4:d} &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;That's all for now. I will be expanding this post probably in the future or coming back and correcting mistakes since this topic is something I've been extensively learning about for the last year. The goal of the post was to refresh my memory on how these things work and to hopefully explain them in simple terms for people that are struggling to understand them. I highly recommend you also check &lt;a href="https://developer.mozilla.org/en-US/"&gt;MDN&lt;/a&gt; for more detailed explanations for all of these functions and methods.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>functional</category>
      <category>higherorder</category>
      <category>es6</category>
    </item>
    <item>
      <title>FRONTEND DEVELOPER GUIDE - PART 3</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:48:18 +0000</pubDate>
      <link>https://dev.to/zasuh_/frontend-developer-guide-part-3-1l9</link>
      <guid>https://dev.to/zasuh_/frontend-developer-guide-part-3-1l9</guid>
      <description>&lt;p&gt;Welcome to part 3 of my blog series! :D&lt;/p&gt;




&lt;h2&gt;
  
  
  ROAD TO GETTING A JOB
&lt;/h2&gt;

&lt;p&gt;Welcome! By now you should have learned a lot of stuff regarding actual programming and have made some personal projects.&lt;br&gt;
Now comes the other side of working as a developer. Most of the time when people think "Programmer" they think we sit&lt;br&gt;
behind computers all day. That's about 90% true, but so do lawyers, doctors, accountants and most people working today.&lt;br&gt;
What we all have in common in the working world is &lt;strong&gt;communication&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can have all the knowledge in the world about computers, but if you can't communicate that knowledge to people who&lt;br&gt;
don't have your level of understanding then you aren't as effective as you might think. In this part we are covering topics&lt;br&gt;
such as soft skills, making yourself known in the employment world, resumes and that dreaded word... interview.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclamer&lt;/strong&gt;: I live in the EU. More specifically Slovenia. We have tech companies large and small here. The market is pretty good&lt;br&gt;
for programmers here. That said I can't speak for people outside of this country, but I will give you some advice where to find&lt;br&gt;
people who know about your market and economy. What I'm trying to say is take the advice in this part and adapt it to your situation.&lt;/p&gt;




&lt;h3&gt;
  
  
  SOFT SKILLS
&lt;/h3&gt;

&lt;p&gt;What are &lt;a href="https://en.wikipedia.org/wiki/Soft_skills"&gt;soft skills&lt;/a&gt;?.&lt;br&gt;
Get some soft skills. Seriously. Talking to people as a new developer can be very difficult. You don't really know the terminology&lt;br&gt;
just yet + just the general anxiety of talking to people is crippling a lot of the times. In part 1 I linked an article that&lt;br&gt;
talks about how to properly ask programming questions. Same applies for real life. You are going to be talking to other developers,&lt;br&gt;
business managers and people who aren't neither. Learn how to talk to all. Context switch in your head and communicate clearly.&lt;br&gt;
If you want a fun podcast that is all about soft skills in the software engineering world listen to &lt;a href="https://softskills.audio/"&gt;Soft Skill Engineering&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At the end of the day, soft skills can only be learned if you constantly talk to people. Go to meetups, events and ask developers out for coffee.&lt;br&gt;
The biggest thing you can do is be humble when talking to more senior people. You don't know everything, they don't either, but they have&lt;br&gt;
way more experience than you. Talk, talk, talk. Maybe take a drama class? Improv? Standup? Oh and one more thing about communication: don't be a dick.&lt;/p&gt;




&lt;h3&gt;
  
  
  HEY, I'M HERE NOTICE ME!
&lt;/h3&gt;

&lt;p&gt;You want people to find you online. In part 1 we talked about you setting up a GitHub account and having your projects hosted there. This is one of&lt;br&gt;
the many entities of your online presence as a developer.&lt;/p&gt;

&lt;p&gt;Another very important one still is having a LinkedIn profile. You don't have to be active all the time, just log on every week or so.&lt;br&gt;
What you should do is pimp out your profile with skills, experience and education. LinkedIn serves as an online CV so treat it as such. It also serves&lt;br&gt;
as a recruitment tool. Set your status to &lt;strong&gt;actively searching&lt;/strong&gt; and you should be getting some recruiter email or messages. If you want you can look&lt;br&gt;
at my personal LinkedIn profile and get an idea how stuff should look like.&lt;/p&gt;

&lt;p&gt;Some other ideas are an active Twitter accound, StackOverflow page or personal blog.&lt;/p&gt;

&lt;p&gt;Why are these important? An active GitHub profile with projects shows you are willing to show your projects to people for criticism, a blog can be&lt;br&gt;
for ideas and tutorials, Twitter could be a shorter version of a blog. Make yourself seen online. Use your real name or some other identifier that&lt;br&gt;
shows that a certain entity is you online. If you don't want to share your info online I completely understand. However companies won't. Just keep that in mind.&lt;/p&gt;




&lt;h3&gt;
  
  
  RESUMES
&lt;/h3&gt;

&lt;p&gt;Resumes are a tricky thing. Each company looks at them differently. Some want a picture, some want a cover letter etc. I was nervous about this untill I found&lt;br&gt;
&lt;a href="http://steve-yegge.blogspot.com/2007_09_01_archive.html"&gt;this&lt;/a&gt; article. I has everything explained that you need for a developer resume so I won't echo what the original author already wrote. Don't take his advice as gospel, just take what you need and what seems fair and logical to yourself.&lt;/p&gt;




&lt;h3&gt;
  
  
  INTERVIEWS
&lt;/h3&gt;

&lt;p&gt;Another tricky subject since it extremely depends on the company you are interviewing at. From my experience you will usually get an offer for an interview&lt;br&gt;
through email. The first interview is probably going to be focused on general questions about yourself, your knowledge and your experiences. Just be truthful&lt;br&gt;
with what you say, if you don't know something or are unsure, ask for a better explanation or simply just say "I don't know". Nobody is going to be mad or&lt;br&gt;
think less of you if you don't know something.&lt;/p&gt;

&lt;p&gt;After the "general" interview, you might be asked to wait so a software enginner can come in the room and maybe ask you some more technical questions. If you&lt;br&gt;
are applying for a junior/entry level position saying you don't know something is again completely fine. This part would also include you solving some simple&lt;br&gt;
problems on a whiteboard or on a PC, but these are reserved for maybe the second round of interviews.&lt;/p&gt;

&lt;p&gt;The "general" interview is over now. Probably the same day or the next day you will get another email with a task to solve at home (again this is just from&lt;br&gt;
my experiences). This problem doesn't have to be perfect, nothing is. You are applying for junior role so if you don't know how to use an API key from Google&lt;br&gt;
Maps just yet, explain to them that you didn't know how to do that, but you tried your best to still make something. Aim for about 70% completion on the project,&lt;br&gt;
write notes where you had trouble and how you approached the challenge.&lt;/p&gt;

&lt;p&gt;You will most likely be called back to talk about the challenge etc. They might email you back saying "We would like to offer you a position" or "Sorry no can do".&lt;br&gt;
If it's the later, that's ok, apply to another company and repeat the process untill you get a job. You will have experiences talking to managers and will eventually&lt;br&gt;
lang something that makes you happy.&lt;/p&gt;




&lt;h3&gt;
  
  
  Additional resources
&lt;/h3&gt;

&lt;p&gt;Need more practice for interviews? You should read &lt;a href="http://www.crackingthecodinginterview.com/"&gt;this&lt;/a&gt; book and watch &lt;a href="https://youtu.be/Lf3fNS-hnKs"&gt;this&lt;/a&gt; video. They will explain things with much more experience and thought than I ever could.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>FRONTEND DEVELOPER GUIDE - PART 2</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:47:21 +0000</pubDate>
      <link>https://dev.to/zasuh_/frontend-developer-guide-part-2-1b61</link>
      <guid>https://dev.to/zasuh_/frontend-developer-guide-part-2-1b61</guid>
      <description>&lt;p&gt;Welcome to part 2 of my blog series!&lt;/p&gt;




&lt;h3&gt;
  
  
  PROJECTS TO BUILD
&lt;/h3&gt;

&lt;p&gt;This part is going to focus on just some recommendations about building front-end web dev projects. They are going&lt;br&gt;
to scale as the list goes down.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make your own site using just HTML/CSS. No frameworks and no JavaScript. Write the code yourself.&lt;/li&gt;
&lt;li&gt;Clone one template from &lt;a href="https://www.free-css.com/free-css-templates"&gt;here&lt;/a&gt; using just HTML/CSS.&lt;/li&gt;
&lt;li&gt;Create a "Simon says", "Towers of Hanoi" or "Tick Tack Toe" game (HTML/CSS/JS).&lt;/li&gt;
&lt;li&gt;Clone &lt;a href="https://creativemarket.com/ikonome/686585-Material-Resume-Blue/screenshots#screenshot2"&gt;this&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Do &lt;a href="http://www.csszengarden.com/"&gt;CSS Zen Garden&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Sign up for &lt;a href="https://www.freecodecamp.org/"&gt;freeCodeCamp&lt;/a&gt;. Do just the front-end projects, skip the tutorials.&lt;/li&gt;
&lt;li&gt;Recreate your website using Vue, React and Angular.&lt;/li&gt;
&lt;li&gt;Clone &lt;a href="https://demos.creative-tim.com/vue-paper-dashboard-pro/#/admin/overview"&gt;this&lt;/a&gt; dashboard using a framework of your choice.&lt;/li&gt;
&lt;li&gt;Write your own CSS grid system.&lt;/li&gt;
&lt;li&gt;Clone Reddit.&lt;/li&gt;
&lt;li&gt;Clone Twitter.&lt;/li&gt;
&lt;li&gt;Clone Facebook.&lt;/li&gt;
&lt;li&gt;Clone the Netflix landing page.&lt;/li&gt;
&lt;li&gt;Clone Spotify.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Some more resources that list projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/P1xt/p1xt-guides/blob/master/speedrun-practice/frontend-dev.md"&gt;P1xt Front End Speedrun&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://skillcrush.com/2018/06/18/projects-you-can-do-with-javascript/"&gt;10 JS projects you can do&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/yaphi1/javascript-project-ideas-and-practical-uses"&gt;JS Projects and practical uses&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jessabean/100-javascript-projects"&gt;100 JavaScript Projects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>FRONTEND DEVELOPER GUIDE - PART 1</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:45:25 +0000</pubDate>
      <link>https://dev.to/zasuh_/frontend-developer-guide-part-1-12lj</link>
      <guid>https://dev.to/zasuh_/frontend-developer-guide-part-1-12lj</guid>
      <description>&lt;p&gt;Welcome to the first official blog series that I'm doing to practice writing guides/tutorials.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who this guide is for: complete beginners and practicing developers.&lt;/li&gt;
&lt;li&gt;Who this guide is NOT for: intermidiate or advanced devs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is my "Baby steps to getting going doing front-end web development for beginners by a beginner". I'm not some&lt;br&gt;
tech-speaker guy who made insane OSS projects or an advocate for a large tech firm. I'm a junior dev who a few months&lt;br&gt;
ago got his first ever job and I want to share some tips on how I got there, so that maybe you can get your feet off&lt;br&gt;
the ground and make some stuff.&lt;/p&gt;

&lt;p&gt;This series will have 3 parts: &lt;strong&gt;Part 1: Resources to learn&lt;/strong&gt;, &lt;strong&gt;Part 2: Making and hosting projects&lt;/strong&gt; and&lt;br&gt;
&lt;strong&gt;Part 3: Advice for job searching&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WELCOME TO PART 1!
&lt;/h2&gt;

&lt;p&gt;The core things that you need for a front-end developer focused productivity are the holy trifecta of web dev: HTML, CSS&lt;br&gt;
and JS. I won't go into too much detail about each language and technology. That's what the resources are for. But in my&lt;br&gt;
own words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML&lt;/strong&gt; is the skeleton and the whole reason why you can put things up on the screen in your browser. It serves
as the architecture and structure of your site or the content if you will.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS&lt;/strong&gt; is the styling component. Colors, fonts, positioning, size or things, animations etc. CSS does all of that and
so much more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JS&lt;/strong&gt; is the interactivity component. This is the main thing you need to learn, the swiss army knife of web dev. If you
can learn JS you can learn anything. It is the programming language of the web.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;There are also things that aren't really programming or development specific, but are necessary to be productive in todays&lt;br&gt;
web dev world:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome Dev Tools&lt;/strong&gt; is an essential tool for debugging, testing, checking and maintaining code. There will be resources to learn this
but you can only learn from articles and videos so much. Best way to really learn dev tools is to work on projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git/Github&lt;/strong&gt; version control is also essential. I highly recommend &lt;a href="https://www.youtube.com/watch?v=SWYqp7iY_Tc"&gt;this&lt;/a&gt; video
by Traversy Media explaining how to make a repo, add code, do commit messages and push to master. Do this first before
you do any projects or learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown&lt;/strong&gt; this isn't a necessity but it's a useful tool to write README files on GitHub and maybe blogs like this one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VSCode&lt;/strong&gt; you need an editor to write your code in. I recommend Visual Studio Code. If you need some help figuring out
how they work &lt;a href="https://www.youtube.com/watch?v=fnPhJHN0jTE"&gt;this&lt;/a&gt; video will help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal/Console/CLI&lt;/strong&gt; knowing how to operate a console is essential. Almost everything you are going to be programming
will involve some use of a terminal. Use &lt;a href="https://youtu.be/Xm790AkFeK4"&gt;this&lt;/a&gt; video and &lt;a href="https://www.learnenough.com/command-line-tutorial"&gt;this&lt;/a&gt; guide to learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right. So are you aren't overwhelmed already are you? If you are it's ok. I was overwhelmed and so was everyone else that had&lt;br&gt;
to learn this stuff. Don't worry about learning everything all at once, learn just the things you NEED. For everything else,&lt;br&gt;
Google is your best friend.&lt;/p&gt;

&lt;p&gt;I also highly recommend &lt;a href="https://codingkilledthecat.wordpress.com/2012/06/26/how-to-ask-for-programming-help/"&gt;this&lt;/a&gt;&lt;br&gt;
guide on how to ask programming questions. And yes it's essential because you are going to be doing two things a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asking questions&lt;/li&gt;
&lt;li&gt;Searching for answers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Learning how to do these is the most important skill you can learn right now. Ok enough fluff, let's get to the resources.&lt;/p&gt;




&lt;h3&gt;
  
  
  HTML/CSS
&lt;/h3&gt;

&lt;p&gt;These two are usually coupled together purely because you can't write CSS without HTML.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Shay Howe has two amazing tutorials for HTML and CSS both for advanced and beginner topics. It is my go to recommendation&lt;br&gt;
for people learning these two. You can find the guide &lt;a href="https://learn.shayhowe.com/"&gt;HERE&lt;/a&gt;. Do all the exercises, look at&lt;br&gt;
the additional resources he provides, write code in your editor and push code to your repository. Don't use some online&lt;br&gt;
editor, code on your own machine and save code to GitHub/GitLab. For references about HTML and CSS use &lt;a href="https://developer.mozilla.org/en-US/docs"&gt;MDN&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After you finish the Shay Howe guides I recommend you do two things: &lt;strong&gt;make your own website&lt;/strong&gt; and do &lt;strong&gt;100 days of CSS&lt;/strong&gt;. To make&lt;br&gt;
your own site you just need HTML and CSS. Make it ugly and messy, but finish it. Make it small. Use only things that are&lt;br&gt;
necessary for showing who you are and what you do (introduction, what languages you know, experience and contact are good sections&lt;br&gt;
to focus on). &lt;a href="https://100dayscss.com/"&gt;100 Days Of CSS&lt;/a&gt; isn't recommended to do all the projects, just enough that you get good at CSS.&lt;br&gt;
Do one project everytime you are bored or have an hour to kill.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn &lt;a href="https://getbootstrap.com/"&gt;Bootstrap&lt;/a&gt;. This could easily be Foundation, Bulma, Semantic UI or no framework at all.&lt;br&gt;
But Bootstrap is widely used to create websites faster. Redesign your personal site with Bootstrap. If you get stuck use the&lt;br&gt;
official documentation or Google around. Teach yourself to know what you don't know.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At this point you can start learning JS, but if you still need practice you can clone the design of one of your favourite sites,&lt;br&gt;
explore the different CSS frameworks mentioned above, learn more about SASS or LESS and maybe even Pug or HAML. The choice is&lt;br&gt;
all yours, what matters is that you get to build something. You will not learn all of HTML and CSS by following guides, you learn&lt;br&gt;
just enough so that you can use it somewhere. Don't go and learn the entire Bootstrap framework. Just use the assets and code&lt;br&gt;
that you need for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You might also be thinking: "Where can I host my sites?". I recommend one of the three options: &lt;a href="https://surge.sh/"&gt;surge.sh&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://pages.github.com/"&gt;GitHub Pages&lt;/a&gt; or for more ambitions stuff &lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt;. All of these are free&lt;br&gt;
to use to a certain limit of data or size.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  JavaScript
&lt;/h3&gt;

&lt;p&gt;This part will be massive just a notice. The JS ecosystem is insanely large, but don't let that turn you away from learning it.&lt;br&gt;
It used to piss me off just as much as you, but overtime you get to understand it and can write functioning applications and sites.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First off there isn't one amazing resource to learn JS. There are tons out there, some better than others. I will try and list&lt;br&gt;
the ones that have actually helped me learn how to add JS to websites and how to use it the "modern way".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I would recommend starting with the &lt;a href="https://www.khanacademy.org/computing/computer-programming/html-css-js"&gt;Khan Academy videos&lt;/a&gt;&lt;br&gt;
on DOM (Document Object Model) manipulation. You can also take the complete HTML/CSS/JS course there if you like. You might learn&lt;br&gt;
something you haven't in the previous guides.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next I recommend you maybe try and add some of what you have learned to your personal website. Maybe just a button that says "Hi!"&lt;br&gt;
when you click it. After that I want to point you to &lt;a href="https://javascript.info/"&gt;javascript.info&lt;/a&gt; and&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"&gt;MDN's Javascript Documentation&lt;/a&gt;. Follow the javascript.info guide, learn as&lt;br&gt;
much as you can from it, what you still don't understand you can lookup using MDN.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At this point I have to recommend that just doing programming exercises and doing guides won't be enough to learn JS. I strongly&lt;br&gt;
recommend you start reading blogs, listen to podcasts, follow subreddits and watch videos on anything JS related. You need to learn&lt;br&gt;
the terminology, design and architecture of writing JS and the guide alone won't teach you this. Consume a lot of programming media&lt;br&gt;
related to JS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After this you can head on to &lt;a href="https://javascript30.com/"&gt;Wes Bos's JS30&lt;/a&gt;. You will need to understand ES6 by this point since&lt;br&gt;
Wes is a heavy user of it. This is by far one of the best resources to really learn JS. You do 30 small projects in 30 days, or even watch them at your own&lt;br&gt;
pace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next I want to recommend some sites similar to 100DaysOfCSS, where you can have on-going practice for JS. If you ever need more&lt;br&gt;
practice hit up &lt;a href="https://www.hackerrank.com/"&gt;HackerRank&lt;/a&gt;, &lt;a href="https://www.codingame.com/"&gt;CodinGame&lt;/a&gt; or &lt;a href="https://www.codewars.com/users/sign_in"&gt;CodeWars&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here you are ready to branch out and learn either React, Angular or Vue. They combine everything you have learned up untill this point. Pick one,&lt;br&gt;
make something small with it, find out which one is best for you and which one makes you more productive. If you want to dive deep into more front-end&lt;br&gt;
and back-end stuff I recommend &lt;a href="https://www.edx.org/course/programming-web-javascript-pennx-sd4x"&gt;Programming For The Web With JS&lt;/a&gt;.&lt;br&gt;
If you want more Computer Science specific stuff do &lt;a href="https://www.edx.org/course/cs50s-introduction-computer-science-harvardx-cs50x"&gt;CS50&lt;/a&gt; or&lt;br&gt;
tackle some of the stuff in &lt;a href="https://teachyourselfcs.com"&gt;Teaching yourself CS&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;That's kind of it! Those are my recommendations for what to learn. There are loads of things I probably forgot, but you are going to learn most&lt;br&gt;
of them anyway when you go through all the resources :D&lt;/p&gt;

&lt;p&gt;Hope you learn something and I will see you in Part 2!&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>What are constructor functions?</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 25 May 2020 05:43:39 +0000</pubDate>
      <link>https://dev.to/zasuh_/what-are-constructor-functions-1bb5</link>
      <guid>https://dev.to/zasuh_/what-are-constructor-functions-1bb5</guid>
      <description>&lt;p&gt;Constructor functions have, at least to me, one of the coolest names in programming. The first time I had to explain to someone what constructor functions are, I got all gitty because I just got to use the word &lt;code&gt;constructor&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Enough of the bullshit. This post will focus on how constructor functions are use in JavaScript&lt;br&gt;
and React. To use my own reasoning for what they are: &lt;em&gt;Constructor functions are functions that are called only once&lt;/em&gt; usually at the start of a script &lt;strong&gt;or&lt;/strong&gt; in React terms when a component is loaded, we use a constructor functions to set the state of that component, usually using props which have been passed to that functions.&lt;/p&gt;

&lt;p&gt;Constructors are functions, but have a few different properties to regular functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are executed with the &lt;code&gt;new&lt;/code&gt; keyword.&lt;/li&gt;
&lt;li&gt;They start with a capital letter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What does the &lt;code&gt;new&lt;/code&gt; keyword do? Well when used it creates an &lt;code&gt;object&lt;/code&gt; and binds it to &lt;code&gt;this&lt;/code&gt;, the body of the new functions is ran, which also changes the &lt;code&gt;this&lt;/code&gt; with new values, properties...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Animal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;species&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// this = {};&lt;/span&gt;

  &lt;span class="c1"&gt;// add properties to this&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;species&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;species&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;big&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;legs&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// return this;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;animal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Animal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Dog&lt;/span&gt;&lt;span class="dl"&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 they are used to &lt;em&gt;create AND initialize an object within a class&lt;/em&gt; while most other functions are created and then need to be called with certain parameters.&lt;/p&gt;




&lt;h2&gt;
  
  
  CONSTRUCTORS IN REACT
&lt;/h2&gt;

&lt;p&gt;Because I haven't personally so far used constructors in any other framework other than React I would like to also explain my own reasoning for how React uses them. React used to have a function called &lt;code&gt;getInitialState&lt;/code&gt; which I happen to still use daily on my job. This function was replaced by just a regular &lt;code&gt;constructor&lt;/code&gt; for setting a component's state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Old way&lt;/span&gt;
&lt;span class="nx"&gt;getInitialState&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="na"&gt;name&lt;/span&gt;    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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="c1"&gt;//this.state.name&lt;/span&gt;
    &lt;span class="na"&gt;surname&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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;surname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//this.state.surname&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;     &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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;age&lt;/span&gt;      &lt;span class="c1"&gt;//this.state.age&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Current way&lt;/span&gt;
&lt;span class="kd"&gt;constructor&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="k"&gt;super&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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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="c1"&gt;//this.state.name&lt;/span&gt;
    &lt;span class="na"&gt;surname&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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;surname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//this.state.surname&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;     &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&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;age&lt;/span&gt;      &lt;span class="c1"&gt;//this.state.age&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//Any other variable you want to define for when state loads&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will most likely find the second way more often now, unless you are reading some legacy React code, but essentially both ways are the same with slight differences, like you having to use &lt;code&gt;super(props)&lt;/code&gt; to refer to that component's parent class constructor. Or in more simple terms you are refering to the parent of that component, which also has a constructor.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>react</category>
      <category>constructor</category>
      <category>functions</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to prevent react-carousel from adapting to image size?</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Sun, 03 Nov 2019 10:08:40 +0000</pubDate>
      <link>https://dev.to/zasuh_/how-to-prevent-react-carousel-from-adapting-to-image-size-2afo</link>
      <guid>https://dev.to/zasuh_/how-to-prevent-react-carousel-from-adapting-to-image-size-2afo</guid>
      <description>&lt;p&gt;Demo of site: &lt;a href="https://jozesuhadolnik.netlify.com/portreti"&gt;https://jozesuhadolnik.netlify.com/portreti&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the above page I'm using react-carousel to display images and give the user the ability to cycle through them. Every time there is a transition to the next image the entire container responds to the size of the image which causes this weird flickering. How can I force the container to be of a fixed size? I've tried changing every container style to no effect.&lt;/p&gt;

&lt;p&gt;Site is made with GatsbyJS. Below are the files which are used for the Project page.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;project.js&lt;/code&gt;&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;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&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;prop-types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;graphql&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="s1"&gt;gatsby&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&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;styled-components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ProjectHeader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ProjectPagination&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SEO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SideBar&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="s1"&gt;../components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;config&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;../../config/site&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
  background-color: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bg&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;;
  position: relative;
`&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;OuterWrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
  padding: 0 &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;contentPadding&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;;
  margin: -10rem auto 0 auto;
`&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;InnerWrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
  position: relative;
  max-width: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&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;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxWidths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;;
  margin: 0 auto;
`&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;pageContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;images&lt;/span&gt; &lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frontmatter&lt;/span&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;Layout&lt;/span&gt; &lt;span class="nx"&gt;customSEO&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;outer-container&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;SideBar&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="nx"&gt;outerContainerId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;outer-container&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;SEO&lt;/span&gt; &lt;span class="nx"&gt;postPath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;postSEO&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;ProjectHeader&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;config&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="nx"&gt;date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;areas&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;areas&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;BG&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;OuterWrapper&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;InnerWrapper&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;Gallery&lt;/span&gt; &lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;postNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/InnerWrapper&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;ProjectPagination&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;prev&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;prev&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/OuterWrapper&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="sr"&gt;/BG&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="sr"&gt;/Layout&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&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="nx"&gt;Project&lt;/span&gt;

&lt;span class="nx"&gt;Project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;propTypes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;pageContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&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;span class="nx"&gt;isRequired&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isRequired&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isRequired&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;allMdx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isRequired&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;isRequired&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;Project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaultProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;pageContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pageQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;graphql&lt;/span&gt;&lt;span class="s2"&gt;`
  query($slug: String!, $absolutePathRegex: String!) {
    images: allFile(
      filter: {
        absolutePath: { regex: $absolutePathRegex }
        extension: { regex: "/(jpg)|(png)|(tif)|(tiff)|(webp)|(jpeg)/" }
      }
      sort: { fields: name, order: ASC }
    ) {
      nodes {
        name
        childImageSharp {
          fluid(maxWidth: 1600, quality: 90) {
            ...GatsbyImageSharpFluid_withWebp
          }
        }
      }
    }
    allMdx {
      nodes {
        fields {
          slug
        }
      }
    }
    project: mdx(fields: { slug: { eq: $slug } }) {
      body
      excerpt
      parent {
        ... on File {
          mtime
          birthtime
        }
      }
      frontmatter {
        cover {
          childImageSharp {
            resize(width: 800) {
              src
            }
          }
        }
        date(formatString: "DD.MM.YYYY")
        title
        areas
      }
    }
  }
`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Gallery.js&lt;/code&gt; carousel component:&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;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&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;prop-types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&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;styled-components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MDXRenderer&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="s1"&gt;gatsby-plugin-mdx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-image-gallery/styles/css/image-gallery.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ImageGallery&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;react-image-gallery&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;GalleryWrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
  .image-gallery {
    max-width: 700px;
    max-height: 650px;
    margin: 3rem auto;
  }
  .image-gallery-image {
    text-align: center;
    background: #383838;
  }
`&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
  max-width: 450px;
  margin: 1rem auto;
  padding-top: 1rem;
  color: white;
`&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Gallery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;text&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;images&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="o"&gt;=&amp;gt;&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="na"&gt;original&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;childImageSharp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fluid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;thumbnail&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;childImageSharp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fluid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&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="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;GalleryWrapper&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;text&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&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;Text&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;MDXRenderer&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;text&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;/MDXRenderer&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="sr"&gt;/Text&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="nx"&gt;ImageGallery&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="o"&gt;=&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="sr"&gt;/&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="sr"&gt;/GalleryWrapper&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&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="nx"&gt;Gallery&lt;/span&gt;

&lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;propTypes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isRequired&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PropTypes&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;span class="nx"&gt;isRequired&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;



</description>
      <category>needhelp</category>
      <category>help</category>
      <category>react</category>
    </item>
    <item>
      <title>How to use Emmet with React/JSX?</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Wed, 29 Aug 2018 06:13:46 +0000</pubDate>
      <link>https://dev.to/zasuh_/how-to-use-emmet-with-reactjsx--1dm3</link>
      <guid>https://dev.to/zasuh_/how-to-use-emmet-with-reactjsx--1dm3</guid>
      <description>&lt;p&gt;Hi, hello, dober dan!&lt;/p&gt;

&lt;p&gt;This isn't a tutorial sadly, more of a request for knowledge :D&lt;/p&gt;

&lt;p&gt;Been learning React recently. As probably many of you I also use Emmet when it comes to writing HTML code more quickly. I wanted to use Emmet for JSX and found myself confused as to why it doesn't work consistently?&lt;/p&gt;

&lt;p&gt;First thing I did was change the "Workplace settings" in VSCode as how this issue instructed: &lt;a href="https://github.com/Microsoft/vscode/issues/41998"&gt;https://github.com/Microsoft/vscode/issues/41998&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That worked, BUT when I created a new &lt;code&gt;.js&lt;/code&gt; file in my &lt;code&gt;src&lt;/code&gt; folder for example and tried writing React/JSX code in it, Emmet didn't work. The only solution I could figure out was to manually change the file type to &lt;code&gt;javascriptreact&lt;/code&gt; every time I create a new file.&lt;/p&gt;

&lt;p&gt;Does anyone have a link to a solution? Thanks :D&lt;/p&gt;

</description>
      <category>emmet</category>
      <category>react</category>
      <category>jsx</category>
      <category>help</category>
    </item>
    <item>
      <title>Just got my first job offer, going to take it. What are some tips for being the best junior developer I can be?</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Thu, 23 Aug 2018 05:35:33 +0000</pubDate>
      <link>https://dev.to/zasuh_/just-got-my-first-job-offer-going-to-take-it-what-are-some-tips-for-being-the-best-junior-developer-i-can-be-1e95</link>
      <guid>https://dev.to/zasuh_/just-got-my-first-job-offer-going-to-take-it-what-are-some-tips-for-being-the-best-junior-developer-i-can-be-1e95</guid>
      <description>&lt;p&gt;Yesterday I got my very first developer job offer. Will be working with React, Node and MariaDB primarily.&lt;/p&gt;

&lt;p&gt;What are some tips the more senior of you have for a junior starting his first job? :D&lt;/p&gt;

&lt;p&gt;Edit: I really appriciate all the advice you guys are giving me, thank you so much!&lt;/p&gt;

</description>
      <category>firstjob</category>
    </item>
    <item>
      <title>I quit my job as a SysAdmin to focus on Web Development, Ask Me Anything!</title>
      <dc:creator>Žane Suhadolnik</dc:creator>
      <pubDate>Mon, 04 Jun 2018 07:59:53 +0000</pubDate>
      <link>https://dev.to/zasuh_/i-quit-my-job-as-a-sysadmin-to-focus-on-web-development-ask-me-anything-3dei</link>
      <guid>https://dev.to/zasuh_/i-quit-my-job-as-a-sysadmin-to-focus-on-web-development-ask-me-anything-3dei</guid>
      <description>&lt;h3&gt;
  
  
  Little bit about me:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I'm turning 23 at the end of June.&lt;/li&gt;
&lt;li&gt;A few months away from graduating with (I guess you could call it) IT degree focusing on computer science and programming.&lt;/li&gt;
&lt;li&gt;Got burned out on my job as a SysAdmin and decided to quit while I still have the ability to.&lt;/li&gt;
&lt;li&gt;I'm focusing on front-end currently (specifically Vue), but really wanna go full-stack in the future.&lt;/li&gt;
&lt;li&gt;Amateur at programming, but I am learning every single day and reflecting what I can do better all the time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AMA!&lt;/p&gt;

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