Kattis solution C#: Transit Woes
Ok, Yraglac's Transit Woes is definitely on the easiest problems in the whole Kattis problems register. But somehow I got stuck on this for quite some time. Specifically on the fourth input line…
Read full postPosted on June 03, 2020
Skillnaden mellan 'props' och 'state'
Både Props och och State är vanliga JavaScript-objekt. Medan båda har information som påverkar outputen av renderingen, är de olika i sin funktionalitet när det kommer påverkan på komponent. Props…
Read full postPosted on January 27, 2020
React props
Props är inputs till React-komponenter. De är enskilda värden eller objekt som innehåller en uppsättning värden som skickas till komponenter vid skapandet med hjälp av en namnkonvention som liknar…
Read full postPosted on January 17, 2020
Vad är state i React?
En komponents state är ett objekt som innehåller viss information som kan förändras under komponentens livslängd sk. lifecycle. Man bör alltid försöka göra en komponents state så enkelt som möjligt…
Read full postPosted on January 07, 2020
Pure Components
React.PureComponent är exakt samma som React.Component förutom att den hanterar metoden för dig. När props eller state ändras kommer PureComponent att göra en ytlig jämförelse av både props och state…
Read full postPosted on January 03, 2020
Skapa komponent i React
Det finns två möjliga sätt att skapa en komponent. Funktionskomponenter: Detta är det enklaste sättet att skapa en komponent. Det är rena JavaScript-funktioner som accepterar props objekt som första…
Read full postPosted on December 29, 2019
React: Skillnaden mellan element och komponent
Ett element är ett vanligt objekt som beskriver vad som ska visas på skärmen när det gäller DOM-noder eller andra komponenter. Element kan innehålla andra element i sina props. Att skapa ett React…
Read full postPosted on December 27, 2019
Vad är JSX?
JSX är en XML-liknande syntaxförlängning till ECMAScript (akronymen står för JavaScript XML). I grunden ger det bara syntaktiskt socker för funktionen vilket ger oss uttrycksfullhet av JavaScript…
Read full postPosted on December 26, 2019
How to secure your Firebase config settings
It’s always good prectice to hide all kinds of API keys for security reasons so that nobody can access the configuration settings in your app. Best way to do it is by creating a .ENV file for local…
Read full postPosted on December 24, 2019
Important questions in basic UX
As a beginner developer there are questions you can ask yourself in order to improve User experience in your applications: Can you navigate only with the keyboard? Can you understand the message if…
Read full postPosted on December 07, 2019
Should I learn React och plain Javascript first?
One question that easily arises if you are a beginner is whether you should use a framework, Javascript library or learn vanilla Javascript (as it is called when you use only pure Javascript) first…
Read full postPosted on December 02, 2019
What is React?
React is a JavaScript library for building user interfaces created by Facebook. React is marketed as component-based, declarative and "create once, use everywhere". Component-based means that our…
Read full postPosted on November 24, 2019
Using external scripts in Gatsby
Exactly what do we mean by external scripts? Well, in my case it was a plain vanilla JS snippet of script that I had to insert in my website's body in order to get it working. I could not find any…
Read full postPosted on November 08, 2019
Using Emmet with React
Emmet is a very nice tool when it comes to autocompletion of html and JavaScript, but is not included in react. Below is a very helpful video on how to activate Emmet in react. Since Emmet is not…
Read full postPosted on March 20, 2019