Should we refactor yet?

Image for post
Image for post
Photo by the author.

With the most recent version of v8, we now have several new JavaScript features available in all major browsers — one of which is String.prototype.replaceAll. It is used for replacing all occurrences of a given string or a regular expression with another string. It looks like this:

It is a very simple addition to String.prototype.replace. …

Better components, with types

Image for post
Image for post
Photo by Ferenc Almasi on Unsplash

Recently, I had this pull request that triggered a short discussion with my teammates. Someone noticed that I used a different method to write types for the function components I wrote, whereas there were other methods used in the codebase.

In this bite-sized React article, I’ll show you the right way to do it.

Function Components From a Type-Oriented Perspective

Functions, in general, are programmatic tools that take some input, process it, and return some output. Function components essentially work the same way. They take properties and convert them into UI elements. You can see below a super-basic function component example from reactjs.org using plain JavaScript.

Which is the better hosting solution for Next.js-like apps in 2020?

Firebase vs Vercel Now
Firebase vs Vercel Now
Based on Photo by Radek Grzybowski on Unsplash

If you’ve recently tried to set up hosting for your web application, you might have noticed something. Hosting web applications in 2020 is both easier and harder than it was only a couple of years ago.

It’s easier because both the tooling and the hosting solutions have improved significantly. Tools like create-react-app, Next.js and, Gatsby have matured and there are tools introduced every day that help mitigate any shortcomings they have. Setting up hosting has also become much easier. Vercel (formerly known as Zeit) has gained a lot of support and popularity, while Firebase has continued its growth with the abundance of GCP (Google Cloud Platform) based services. …


Ozan Tunca

Senior Software Engineer @DeliveryHerocom, Music Producer @ soundcloud.com/ozantunca, ozantunca.org

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