DEV Community

Cover image for Weekly Digest 19/2021
Marco Biedermann
Marco Biedermann

Posted on • Updated on

Weekly Digest 19/2021

Welcome to my Weekly Digest #19 of this year.

This weekly digest contains a lot of interesting and inspiring articles, videos, tweets, podcasts, and designs I consumed during this week.


Interesting articles to read

Frustrating Design Patterns That Need Fixing: Birthday Picker

In this new series of articles on UX, we take a closer look at some frustrating design patterns and explore better alternatives, along with plenty of examples to keep in mind when building or designing one.

Frustrating Design Patterns That Need Fixing: Birthday Picker - Smashing Magazine

JavaScript testing: 9 best practices to learn

We zoom in on nine best practices for JavaScript testing that can help you write better tests and help your team to better understand them.

JavaScript testing: 9 best practices to learn - LogRocket Blog

Using Forms in React

Learn how to build forms with React, the difference between controlled and uncontrolled inputs, and which to use.

Using Forms in React

How we use Web Components at GitHub

GitHub has long been a proponent of Web Components. Here's how we use them.

How we use Web Components at GitHub | The GitHub Blog

Some great videos I watched this week

Typescript for React Components

Typescript is quickly becoming the industry standard for React development. Take your Typescript skills from beginner to masters level by learning everything you need to know about how to write components in React the right way.

by Jack Herrington

Advanced CSS Border-Radius Tutorial

How to create complex shape with only CSS border-radius and understand how to separately control horizontal and vertical border-radius.

by Red Stapler

Thinking on ways to solve a Media Scroller

In today’s GUI challenge, Adam Argyle shares thinking on ways to create inline scrolling experiences for the web that are minimal, responsive, accessible and work across browsers and platforms (like TVs!).

by Adam Argyle

Amazon's, Etsy's and Ebay's Checkout UI

Here are five key UI elements that appear on leading ecommerce companies' checkout screens. The UI comparison also has lead to a freebie Figma Checkout template.

by Jakub Linowski

Yet Another 5 Must Know CSS Tricks That Almost Nobody Knows

CSS is a vast language with tons of features and it is impossible to know them all. In this video I will be covering another 5 features in CSS that nobody knows but are incredibly useful.

by Web Dev Simplified

Testing React Components

Here, Amy Dutton will show you how to write tests for a React component using Jest and the React Testing Library.

by Amy Dutton

Mastering React Hooks with Typescript

Let's dive DEEP again into Typescript but this time to look at React Hooks.

by Jack Herrington


Useful GitHub repositories

Folio

A customizable test framework to build your own test frameworks.

GitHub logo microsoft / folio

A customizable test framework to build your own test frameworks

Folio npm

If you are looking for Playwright Test, see on playwright.dev for the documentation and examples.

A highly customizable test framework.

Folio is available in preview and is under active development. Breaking changes could happen. We welcome your feedback to shape this towards 1.0.

Docs

Writing a test

Writing your first test is easy.

// example.spec.ts
import test from 'folio';

test('let us check some basics', async () => {
  test.expect(1 + 1).toBe(2);
});
Enter fullscreen mode Exit fullscreen mode

You can now run the test.

# Assuming my.spec.ts is
Enter fullscreen mode Exit fullscreen mode

zx

A tool for writing better scripts

GitHub logo google / zx

A tool for writing better scripts

🐚 zx

#!/usr/bin/env zx

await $`cat package.json | grep name`

let branch = await $`git branch --show-current`
await $`dep deploy --branch=${branch}`

await Promise.all([
  $`sleep 1; echo 1`,
  $`sleep 2; echo 2`,
  $`sleep 3; echo 3`,
])

let name = 'foo bar'
await $`mkdir /tmp/${name}`
Enter fullscreen mode Exit fullscreen mode

Bash is great, but when it comes to writing scripts, people usually choose a more convenient programming language. JavaScript is a perfect choice, but standard Node.js library requires additional hassle before using. The zx package provides useful wrappers around child_process, escapes arguments and gives sensible defaults.

Install

npm i -g zx
Enter fullscreen mode Exit fullscreen mode

Requirement

Node.js >= 14.13.1

Documentation

Write your scripts in a file with .mjs extension in order to be able to use await on top level. If you prefer the .js extension…

Remote Redux DevTools

Use Redux DevTools remotely for React Native, hybrid, desktop and server side Redux apps.

GitHub logo zalmoxisus / remote-redux-devtools

Redux DevTools remotely.

Remote Redux DevTools

Demo

Use Redux DevTools remotely for React Native, hybrid, desktop and server side Redux apps.

Installation

npm install --save-dev remote-redux-devtools

Note: for Windows use remote-redux-devtools@0.5.0 (newer versions will not work due to a Windows issue fixed in react-native).

Usage

There are 2 ways of usage depending if you're using other store enhancers (middlewares) or not.

Add DevTools enhancer to your store

If you have a basic store as described in the official redux-docs, simply replace:

import { createStore } from 'redux';
const store = createStore(reducer);
Enter fullscreen mode Exit fullscreen mode

with

import { createStore } from 'redux';
import devToolsEnhancer from 'remote-redux-devtools';
const store = createStore(reducer, devToolsEnhancer());
// or const store = createStore(reducer, preloadedState, devToolsEnhancer());
Enter fullscreen mode Exit fullscreen mode

Note: passing enhancer as last argument requires redux@>=3.1.0

When to use DevTools compose helper

If you setup your store with middlewares and enhancers


dribbble shots

Localy — Roadmap

https://cdn.dribbble.com/users/1494589/screenshots/15646449/media/f8e8a1b9e5190da7702646f3b0c02214.png

by Arman Rokni

Govoroon App

https://cdn.dribbble.com/users/653699/screenshots/15648656/media/9d41b3c079f3ca5e14f6641b73e5cc08.png

by Gregory Riaguzov

IoT App for growing plants

https://cdn.dribbble.com/users/2770155/screenshots/15649083/media/e7ee2c36f5392362d992d77aecf9f2ab.jpg

by Amirhossein Soltani

Doctor appointment

https://cdn.dribbble.com/users/2067473/screenshots/15644898/media/c2dda673891b89964bd3fb1ebe14a646.png

by Martyna Zielińska

Allhand - Mobile App

https://cdn.dribbble.com/users/4536274/screenshots/15648806/media/f2ad2023d41f32d5fadd0b7a13bb6d68.png

by Baten


Tweets


Picked Pens

GLSL Sample027

by Yuki

Spring pattern

by Liam Egan

Podcasts worth listening

Syntax FM - Technical Debt

In this Hasty Treat, Scott and Wes talk about technical debt — what it is, why does it occur, and some techniques for reducing and avoiding it.

The CSS Podcast - Snap Points

In this episode, Una and Adam are guiding scroll areas into their peaceful resting places, maintaining alignment, keeping visual harmony, and improving the overall experience with the content.

Smashing Podcast - What is The Future of CSS?

We’re starting our new season with a look the future of CSS. What new specs will be landing in browsers soon? Drew McLellan talks to expert Miriam Suzanne to find out.

3 Minutes with Kent - Cypress Driven Development

Software Engineering Daily - Natural Language Processing

Natural Language Processing (NLP) is a branch of artificial intelligence concerned with giving computers the ability to understand text and spoken words. “Understanding” includes intent, sentiment, and what’s important in the message.


Thank you for reading, talk to you next week, and stay safe! 👋

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.