The Fetch API

Fetch allows to perform network requests by writing way less code than using XMLHttpRequest, and it implements the promise API under the hood.

An example of code using fetch:

  1. Fetch takes as an argument the URL endpoint where to grab the data from. This can be either an internal or external resource.
  2. Fetch returns a promise which can be tackled with the .then method we have seen in the previous blog post.
  3. If the promise is resolved, the callback function of .then is fired. In…

A random network

While following a React tutorial, I had to grab some data from an external API using the fetch API. The logic seemed easy to understand and the data were rendered correctly. Nevertheless, I couldn’t fully grasp the concept of “returning a promise” and I wanted to understand a bit more in detail how the fetch API worked under the hood. Reading about fetch led me to read about promises and eventually about XMLHttpRequest and callbacks. I decided to slow down along my learning path to try to understand how network requests had developed and gotten better throughout the years. After…

React js

During the past couple of months, I’ve been diving into React and built some simple applications. One concept I’ve been having a hard time digesting is the one of React State. I recently stumbled on an excellent tutorial (which I highly recommend) that clearly explains it. In this brief article, I will try to summarize the most important concepts I have learned while following the tutorial so that it might be helpful for others as well :-)

What is state in React? The state of a component is the data that is being used and rendered inside our component at a particular time.

In the code below we create a variable (iceCreamFlavor) and assign to it an initial value of “chocolate”. This variable is rendered inside…

“Don’t be satisfied with stories, how things have gone with others. Unfold your own myth” Rumi

Back in the 13th century, famous Persian poet and Sufi mystic Rumi was suggesting us to take action and to shape our destiny regardless of other people’s opinions and achievements. Today, I believe this quote to be more relevant than ever.

Too often our decisions and definitions of success are affected by clichés and other people’s opinions. As a consequence of this, we tend to forget what is really meaningful to us, thus increasing the probability to miss worthwhile opportunities that appear along our…

Writing requires time. Especially when it comes to creating a compelling and original text, that will stick to the mind of your readers. Writing requires a range of skills, from creativity to the ability to organize information and building arguments. To be effective, writing needs to be nurtured.
Why on earth should then a business spend time on running a blog that will require a lot of writing?

The reasons are many, let’s dig into some of them!

Increase traffic to your website

A good blog helps you increase traffic to your website. Whenever you publish a post, you create a new page URL that…

It has happened to each one of us, at least once in our life. You come home from work and you feel like what you are doing is not enough to nurture your mind. You feel like a green meadow waiting for the most beautiful flowers to grow. In other words, you are waiting for inspiration, to start an activity that you enjoy doing, that makes you feel happy and gratified.

This activity I have decided to call it the “click moment”.

The click moment is about what is meaningful to you, what makes you smile and feel satisfied. It…

By Alice Moretti

Recently I have been talking to a design startup founder who was looking for a social media marketer. He was looking for a creative candidate, able to draft a compelling digital marketing strategy to make his startup visible on social media and thus draw leads to his website. Despite his enthusiasm, after asking him a couple of questions about the startup mission and products, I realized that the guy was missing a clear idea of what made his design products different from the others available on the market. In addition to this, he had a very long list of items…

Alice Moretti

Frontend-developer, nature addicted, runner, coffee & yoga lover living in Helsinki.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store