Skip to content

JavaScript

React Models

After a lot of years of application development I was just improving my frontend skills while learning react. Since my passion is architecture and therefore application structure, I thought about how to structure a react app. I thought about my frontend experiences in developing RCP applications build with Swing or Eclipse RCP (SWT). In those RCP environments one usually desings UI models that are stable abstraction of what one wants to view and then use UI components that operate on these models. Stable abstractions are usually a good practice that help you to stay flexible and with “flexible” I mean to easily change UI components and to easily test their… Read More »React Models

Fundamentals of React functional components you should know

In this blog I would like to demystify React’s functional components. I want to give you a deeper understanding of why React works as it does, so that you can focus on writing React applications instead of hunting bugs. Function components – the mental model gap In the “Main Concepts” section in the React docs they tell you what a function component is with a simple example. In the React docs, Main Concepts in the section Function and Class Components they say: This function is a valid React component because it accepts a single “props” (which stands for properties) object argument with data and returns a React element. We call such… Read More »Fundamentals of React functional components you should know

Typescript – cheat sheet

This cheat sheet contains typescript definitions that I sometimes use during development and that often can be easily forgotten. All examples are published on my codepen.io account so that you can directly edit and test them. They are also available in my codepen collection typescript cheat sheet. This cheat sheet is a work in progress and I will continue to add new sections. Wrapper function A wrapper function is a function that has the same signature as the target function it wraps. Wrapper functions are used applying aspect-oriented programming or a kind of implementation of the decorator pattern. See the Pen typescript cheat sheet – wrapper function by René Link… Read More »Typescript – cheat sheet

Lexical vs. dynamic scoping

In this blog I want to give you some examples about the difference between lexical and dynamic scoping. I will not dive into the details. You will find a lot of other resources about it. Here is a small list: Scope (computer science) Javascript — Lexical and Dynamic Scoping? What is lexical scope? The following JavaScript and Bash examples are almost equivalent in structure. Nevertheless they will lead to different results, because of the different scoping type these languages use. Lexical scoping – e.g. JavaScript In languages with lexical scope (also called static scope), name resolution depends on the location in the source code and the lexical context (also called static context), which is defined by… Read More »Lexical vs. dynamic scoping

GDPR Cookie Consent with Real Cookie Banner