Recently I began the development of a website for my father's foodservice and in the setup phase, I really wanted to make sure that I went into the projects with alias/path imports set up out of the box. I also wanted to try my hand at creating a typescript project from scratch and build upon my typescript knowledge. I decided on a Gatsby project with a focus on using typescript.
I started with trying to edit gatsby’s Webpack config through gatsby-node’s onCreateWebpackConfig action. The below code will make your imports work as aliases. Within the alias object, the key is…
Start by installing styled-components, and importing them into your react file.
Windows subsystem for Linux is a Windows supported application that allows Windows users to run a GNU/Linux environment that includes most Linux command-line tools directly on windows. unmodified without having to go the route of the traditional dual-boot setup
installing WSL is quick and easy. From windows PowerShell, in admin mode, you’re gonna type in these commands.
First, we enable the Windows Subsystem for Linux by typing the following command in PowerShell:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Next if you’re running windows 10, we’ll want to update to wsl2 which has a plethora of upgrades built upon WSL1.
When it comes to coding, there's no better feeling than being able to just jump in and immediately know what you’re doing. sometimes though we need to have a bit of structure to how we do things. Introducing project management!
My advice for the planning of a react project is to break it down by functionality and where you want it to be visible. Let's say that you want to make a social media site based on gaming communities. you would have to break that down into its base components.
What pages will you have?
What will be on your navBar
Using the multiple pointers pattern by creating pointers or values that correspond to an index or position and move towards the start end or middle based on a condition can help you efficiently solve problems with minimal space complexity.
usually, you use it if you’re searching for a pair of values or a condition, you start at two places and you work your way to each other in order to reach a middle value.
an example of this is if you were asked to find a pair of numbers that add up to something in particular. assuming the array of…
The other day I came across this issue while trying to generate a new react project, it deletes the react repo because of an issue with the version of node that you have installed.
As stated in the image, the reason why I was getting this issue was because I wasn't updated to the latest version of node, but when I tried to update using homebrew I was still getting the issue.
It turns out that I was getting the issue because of NVM which is a node version manager that I had installed a while ago.
To solve the…
A frequency counter is a problem solving algorithm that you can implement when you have a value that you want to find the frequency of,
it can be employed to find how many times a letter reoccurs in a string or to find out how many times a value, word, etc is repeated in any dataset given to you.
The pattern that this algorithm follows is to loop through the data given to you and start to build out an object.
In the question that appears above we are asked to find out how many times each letter appears in…
Sass is a stylesheet language that’s compiled to CSS. It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized and makes it easy to share design within and across projects. — Sass docs
Sass, in a nutshell, allows us to use CSS as more of a coding language, letting us use if statements and variables/nested functions It allows us to decide what colors to show dependent on the current situation given to us in the app and based on the class names around us.
What is docker? According to docs.docker.com:
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.
Docker runs on three main fundamental concepts.
- a docker file
- an image
A dockerfile tells the code how to build out an image, basically, it asks for the os and the building steps in order to unpack containers and run them.
An image is a snapshot of your…
Software engineer, Graduate of Flatiron school. Currently volunteering! Looking to talk to fellow engineers, please send me a message!