Many developer have implemented a similar functional component and have seen this behavior. Some have even opened a bug report in the official React repository.

The reason why this happens is an intentional feature of the React.StrictMode. It only happens in development mode and should help to find accidental side effects in the render phase.

Let’s find out if there is a way to avoid this problem by trying different implementations.

A) Functional Component with useState

function App() {
const [click, setClick] = React.useState(0);
console.log('I render 😡', click);
return (
<div>
<button onClick={() => setClick(click => click + 1)}>
Clicks: {click}
</button>
</div>
)
}


The Problem

if you try the following command to update your service after changes and it works for you with some projects but not with all projects I can help you to fix the problem and understand the reason behind this behaviour:

Let’s explain what this command is requested to do:

  • up start the service your_service
  • --build build the image if it does not exist or has changed. Use cache for parts which have not changed.
  • --no-deps do not start any linked services
  • --detach run container in background(official documentation docker-compose up)

The Problem

if you try the simples possible image and get this error you have found the information to solve your problem.


MacOS User can delete all Attachments from multiple selected Emails with the integrated Mail App from Apple https://macpaw.com/de/how-to/delete-mail-attachments


Before I will tell you the WHY

I should list the reasons I was looking into ReScript:

  • functional programming
  • support for strict types
  • pattern matching
  • Code Editor language support
  • test driven development
  • access to many libraries solving common problem or providing access to APIs
  • embedding or providing libraries
  • Visual Debugging
  • Source level Error and Exception logging
  • Big Community to support and drive the development of new features
  • Build pipeline which can handle all assets
  • deployment pipeline to support continues integration and deployment
  • error, exception and performance monitoring…

Executive brief

Setup an environment with independed npm packages for Javascript, Typescript and React components or libs which support all modern package formats.

Tooling

These are the tools we will use under the hood:

Goals

  • reuse codeparts, react components and type definition between frontend and backend
  • reuse codeparts, react components and type definition in other project as npm packages
  • support mixed Javascript and Typescript development
  • can be used for fullstack projects (frontend, api, libaries)

Sections

  1. Setup a Monorepo for Javascript backend services
  2. Add a Create React App frontend with a component libary
  3. Support Typescript in packages
  4. Deploy to private Github NPM registry

Example “ekzemplo” App Use Case

  • As a User…


What is the problem?

MacOS includes a very handy backup system called Time Machine which does a snapshot of all changes every hour.

As a Developer relying on other packages it is quit common that a simple project is based on thousends packages which easily aggregate to hundredthousends of files. Each request for updating on package might change thousends of files leading to a huge backup for something which exists online on multiple servers and could be restored with a simple single command per project.

Existing Solutions

Searching for a solution if found this tools:

  • asimov — scanning your filesystem for known dependency directories (node_modules, vendors,..)…


What you should know about trying to use Docker on Apple’s new machines with the M1 processor

Apple logo
Apple logo
Photo by the author.

Docker Is Not Supported on Apple M1 MacBooks/Mini

Docker is based on Golang and needs virtualization support. Getting Go to support the new architecture is not a problem and will be solved soon.

The big problem is virtualization support, which was always a problem for Docker on windows where Windows Home had no support and not all chips used for PC had the required chipsets.

Docker has written a blog post that explains all the problems that need to be solved:

  • Migrate to new hypervisor framework (does not exist in the public version of Big Sur)
  • Multi-architecture builds
  • Golang with native M1 support
  • Electron with native M1 support…


I built my AWS CodeBuild Pipeline with a new feature called “ Conditional Page Builds” and it did not worked as expected in the build environment.

Starting the build process again with no change in the source code and with identical copies of the .cache and public folder generated this output:

...
info One or more of your plugins have changed since the last time you ran Gatsby. As a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 0.011s
...
success Building production JavaScript and CSS bundles - 30.860s
success Rewriting compilation hashes - 0.005s
...
success run queries…


Capture a Screencast Movie

macOS since 10.14 (Mojave) has an App called Screenshot. You can start it like any other App but the usual way is to use the keyboard shortcuts

This will bring a Toolbar and a selection box to define the part of the screen which needs to be captured.

  1. move and resize the selection box
  2. click the record video button on the toolbar
  3. start with the recording

Andreas Heissenberger

Fast-track professional successful in the design, development and deployment of technology strategies and policy. Experienced leading Internet and IS operations

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