React Hooks – useState hook example



Hooks are a new functionality of React, thanks to which we can “hook into” React features, which makes writing applications easier. First hook that I want to show you is called useState and it is a hook that allows you to use state in a functional component (before hooks you could not use states in functional components, which is why they were called stateless components. Now the name has been changed to functional components).

Read More React Hooks – useState hook example

Styling links with css



Standard appearance of hyperlinks on a website depends on the browser. Each browser can display links and their variants (with different pseudo-classes) in a different way.

Usually we want to set our own styles so to display links in the same way in any browser.

Links can have different states, and each of this states can be styled. This states are called pseudo-classes.

Read More Styling links with css

Basic git commands

You can perform git commands for example in:

cmd console (widnows start -> cmd. It should oppened Command Prompt app. To go to the root directory, enter cd \ . Next enter cd + path to directory with your project, e.g. cd Users\ Joanna\Desktop\my-project

git bash console, which you can get from https://git-scm.com/downloads . After installing console go to directory with your project, right click and select: Git Bash Here (then console opens).

If you have your console with path to your project, you can enter first command (step one).

Read More Basic git commands

Rem, em – length units in CSS



I must admit that I rarely used such units of length as rem and em so far. I usually used pixels (px), because somehow it was easier for me to associate what size a given element will have.

The rem and em units, however, have one advantage over pixels – they can be set in correlation to parent font size (em) or root font size, which most often is <html> elemet (rem). This gives the ability to manipulate sizes for many elements at once. The default root font value is usually 16px (but it depends on the browser).

Read More Rem, em – length units in CSS