Open in app

Sign In

Write

Sign In

Thomas Rubattel
Thomas Rubattel

188 Followers

Home

About

Dec 16, 2022

Conditionally prepend a string to another string in TypeScript

This short article will discuss on how to prepend a string conditionally in the most composable way. Use case The goal to achieve is to prepend a string — a separator— to another string conditionally. A code snippet speaks a thousand words. The property deathDate has to be prepended by a /…

Join

2 min read

Conditionally prepend a string to another string in TypeScript
Conditionally prepend a string to another string in TypeScript
Join

2 min read


Jul 14, 2022

Things I wish I knew before jumping into TypeScript

Last updated on 2023–02–06 to include changes up to TS 4.9.4 What is TypeScript TypeScript is a programming language created by Microsoft in 2010. On October, 1st, 2012 TypeScript was publicly unveiled. Later on, in November 2014 the Angular team at Google joined the effort. TypeScript started from a problem that was observed…

Typescript

14 min read

Things I wish I knew before jumping into TypeScript
Things I wish I knew before jumping into TypeScript
Typescript

14 min read


Feb 11, 2021

Function composition vs function decorator

Last updated on 2023–01–14 Function composition vs function decorator Function composition and function decorator are two different techniques for combining functions. In programming, the function is one of the most important abstraction for building application, especially as functional programming is gaining momentum. It is thus quite important to know these two techniques and also their…

Typescript

5 min read

Function composition vs function decorator
Function composition vs function decorator
Typescript

5 min read


Dec 6, 2020

Prevent a React component from re-rendering with a HOC

What is HOC ? Higher-Order Component is a pattern in React invented by Sebastian Markbåge in early 2015. Even though HOC was first created in the context of Class component, HOC can also be used with Functional components. HOC started to gain traction after Andrew Clark — co-author of Redux — released the utility…

Decorator Pattern

3 min read

Prevent a React component from re-rendering with a HOC
Prevent a React component from re-rendering with a HOC
Decorator Pattern

3 min read


Published in Blick.log()

·Apr 20, 2020

Async tracking in lifecycle with React Hooks

In this article we will see how to implement a complex tracking mechanism using React Hooks. We would like to track a very specific event, namely when a piece of UI is actually viewed by users. Use case Blick.ch is one of the largest online news portals based in Switzerland. Our home…

Tag Management System

4 min read

Async tracking in lifecycle with React Hooks
Async tracking in lifecycle with React Hooks
Tag Management System

4 min read


Published in The Startup

·Aug 26, 2019

Lifecycle, state, getDerivedStateFromProps and Hooks

Introduction React 16.3 introduced a new lifecycle function called getDerivedStateFromProps. This new lifecycle function is meant as replacement to componentWillReceiveProps which is unsafe for async rendering when misused. componentWillReceiveProps will no longer be supported from React 17, unlike its counterpart UNSAFE_componentWillReceiveProps. Aside In this tutorial we’ll use the so-called class properties which…

Componentwillreceiveprops

5 min read

Lifecycle, state, getDerivedStateFromProps and Hooks
Lifecycle, state, getDerivedStateFromProps and Hooks
Componentwillreceiveprops

5 min read


Jul 7, 2019

Strategy pattern in functional programming

The Strategy pattern is one of the most used design pattern in the object-oriented programming (OOP) world. It was coined by the so-called Gang of Four. Starting point We’d like to implement a binary function (two parameters) adding two numbers. const a = 10; const b = 32; const add = (a, b) =>…

Java Script

2 min read

Strategy pattern in functional programming
Strategy pattern in functional programming
Java Script

2 min read


Published in Valtech Switzerland

·Nov 5, 2018

Functional programming concepts explained in JavaScript

Last updated on 2023–01–12 “Any application that can be written in JavaScript, will eventually be written in JavaScript”. — Jeff Atwood, 2007 Functional programming got a lot of attention over the last years even though it’s there for a while, since McCarthy designed LISP from 1958. …

Functional Programming

15 min read

Functional programming concepts explained in JavaScript
Functional programming concepts explained in JavaScript
Functional Programming

15 min read


Published in Valtech Switzerland

·Oct 1, 2018

Example of async/await in JavaScript

ES2016 introduced async functions. This feature was proposed by Brian Terlson. async/await construct is inspired by .NET. The goal of async function is to write code as if each instruction would be executed one after another (synchronously) but still having the things done asynchronously. An async function returns a promise. Aside …

Asyncawait

3 min read

Example of async/await in JavaScript
Example of async/await in JavaScript
Asyncawait

3 min read


Published in Valtech Switzerland

·Aug 12, 2018

Setup a GraphQL API with Apollo 2.0 Sequelize and Express.js

Introduction In this tutorial all steps for building a GraphQL API are detailed. On that purpose we are going to use mainly the following Node.js modules, Express.js, Sequelize, Apollo 2.0 server and Apollo 2.0 client. The first one is a lightweight web framework while the second one is an ORM for…

Graph QL

9 min read

Setup a GraphQL API with Apollo 2.0 Sequelize and Express.js
Setup a GraphQL API with Apollo 2.0 Sequelize and Express.js
Graph QL

9 min read

Thomas Rubattel

Thomas Rubattel

188 Followers

Front-end developer based in Tokyo and Zürich

Following
  • Sébastien Dubois.

    Sébastien Dubois.

  • Max Koretskyi

    Max Koretskyi

  • Rakia Ben Sassi

    Rakia Ben Sassi

  • Amy J. Andrews

    Amy J. Andrews

  • Aphinya Dechalert

    Aphinya Dechalert

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech