Web Tools #387 - ES6 Generators, React Tools, Git/CLI, Uncats

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #387 • December 17, 2020

Advertisement
Cubbit Personal Cloud
Sync store and share your files with Cubbit Cloud. Enjoy the highest security standards and stop paying monthly fees for the cloud storage space. Spoiler: there’s a big discount dedicated to Web Tools Weekly’s readers! 👇
Discover the Offer
Cubbit Personal Cloud

Up until now, I've never looked much into JavaScript's Generator functions. They were introduced way back in ES6, so there's really no excuse for not being familiar with them at this point! So let's do a quick crash course in JavaScript Generators.

MDN's article on the subject describes them and their practicality quite nicely:

"Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances."

That's pretty cool! Off hand, I can't necessarily think of any specific examples where I wanted a function to do this, but I can certainly see where it can come in handy once it's in my knowledge toolbox.

I'll create a simple interactive demo to illustrate what a Generator does. The demo will include the following Generator function:

function* valuesLogger() {
  yield op.innerHTML = "Nothing";
  yield op.innerHTML = input.value;
  yield op.innerHTML = input.value;
  yield op.innerHTML = input.value;
}

Notice the function* syntax which tells the JavaScript engine that I want this to be a generator function. Notice also the yield keywords being used on multiple lines in the function body.

The demo has an input field and a button. The button will call the following code each time it's pressed:

myGenerator.next();

The myGenerator variable is a reference to the valuesLogger() generator function. When the function is initially called, the Generator's iterator object is returned. When the button is pushed, the iterator object's next() method executes the function body up until it finds a yield keyword, then it exits the function. Each subsequent press enters the function body where it left off, again looking for the next yield.

View the full demo here

You can change the text in the input field after each button press. Notice also the logs in the console in addition to the values shown on the page. The console is logging each next() method's return value, which is an object containing:

  • The value returned when the iterator exits the function
  • A done property that indicates if the iterator has "yielded" its last value
If any of this is new and somewhat confusing, just mess around with the code a little and it'll make more sense. What I've discussed here is just the basics so I'll try to discuss more about Generators in subsequent tips.
 

Now on to this week's tools!

React Tools

Cubbit Personal Cloud
Sync store and share your files with Cubbit Cloud. Enjoy the highest security standards and stop paying monthly fees for the cloud storage space. Spoiler: there’s a big discount dedicated to Web Tools Weekly’s readers! sponsored 

monaco-react
Monaco editor wrapper for easy one-line integration with React apps without the need to use webpack's (or any other module bundler's) configuration files.

react-code-view
A React component for documentation sites that allow Markdown snippets to include live React examples edited in real time.

Reapop
A simple and customizable notifications system for React (e.g. toast messages, alerts, popovers, etc).

Reapop

react-instagram-embed
React component to embed an Instagram feed.

react-animated-numbers
Adds a neat animated flipping effect to a number that increases or decreases on the page.

react-collapse
Component wrapper for doing a collapse/expand effect on an element on the page with varying content, size, etc.

use-editable
A small React hook to turn elements into fully renderable and editable content surfaces, like code editors, using contenteditable.

React Awesome Reveal
React components to add reveal animations using the Intersection Observer API and CSS animations.

react-uploady
Modern file-upload components and hooks for React.

react-autocomplete-hint
A React component that adds inline auto-complete hints to form inputs.

React Flow
Now at version 8+. Customizable library for building interactive node-based editors, flow charts and diagrams.

React-PDF
Now at version 5+. Display PDFs in your React app as easily as if they were images.

Git, GitHub, and CLI Tools

Tech Productivity Newsletter
The best articles and tools, hand-picked, for tech professionals who want to be more productive.  promoted

auth.js
GitHub API authentication library for JavaScript and Node.js.

SpanTree
Browser extension that makes navigating a GitLab repository feel like a breeze by providing a familiar tree structure.

Boring Cyborg
A GitHub bot to automatically label pull requests and issues and perform all the boring operations that you don't want to do.

Starship
Minimal, blazing-fast, and infinitely customizable prompt for any shell.

Starship

80s Retrowave
A retro color scheme for Windows terminal.

Git User Switch
CLI Tool to easily switch the current Git user, email, and signing key.

ghat
Reuse GitHub Actions workflows across repositories.

WinApps for Linux
Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS.

cache
A GitHub Action to allow you to cache dependencies and build outputs to improve workflow execution time.

Repo Analytics
Thorough analytics for your GitHub repositories that includes better traffic data and user analysis.

GitHub Spray
A CLI to generate sprays for your GitHub contribution history graph.

Vershd
Now at version 3+. The effortless Git GUI for Windows, Mac, and Linux.

Refined GitHub
Now at version 20+, getting regular updates. Browser extension that simplifies the GitHub interface and adds useful features.

The Uncategorizables

SeeLink
An easy way to share and collaborate on links (built by a 14 year-old developer!).

Appbase.io
Elasticsearch supercharged. Create relevant search experiences with NoCode, JavaScript UI components or REST APIs.

Panelbear
Analytics for data-driven websites. Grow your website right with the analytics toolkit that's simple, scalable, and respects the privacy of your visitors.

ChronoFlo
A timeline maker to create a beautiful online timeline for free. The premium version allows you to embed timelines on your website.
 
ChronoFlo

AuthUse
Password-free, privacy-first login authentication that’s free.

localGFonts
Online tool to provide fonts and CSS snippets for self-hosting using Google fonts.

Sheetson
Build Instant APIs from Google Sheets. Gives you an instant backend solution for all your coding projects.

Concords
A pluggable web architecture for the modern data-driven web-app, decentralized and running completely in the browser.

Airsite
Create websites on your phone (iOS and Android), no programming skills required.

LetsView
A screen mirroring tool that apparently allows you to mirror across platforms and devices.

web-ext
Now at version 5+. A command line tool to help build, run, and test browser extensions using WebExtensions (the standard for building browser plugins and add-ons).

A Tweet for Thought

Some people just can't let go.

A Tweet for Thought
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

If you're designing or developing game UIs, you'll definitely want to check out Game UI Database, a showcase of video game UI screenshots that are categorized and searchable.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

Support this newsletter:
PayPal.me  Patreon /  GitHub Sponsors

Older messages

Web Tools #386 - Frontend Frameworks, SVG, Build Tools

Thursday, December 10, 2020

Web Tools Weekly WEB VERSION Issue #386 • December 10, 2020 The following intro is a paid product review for Preflect, a microsurvey and navigation tool that helps visitors stay engaged on your website

Web Tools #383 - Black Friday, CSS Tools, SVG, CMS's

Friday, December 4, 2020

Web Tools Weekly WEB VERSION Issue #384 • November 26, 2020 Advertisement Cubbit Personal Cloud Sync, store, and share your files with Cubbit Cloud. Enjoy the highest security standards of zero-

Web Tools #385 - JS Utilities, VS Code, React Tools

Friday, December 4, 2020

Web Tools Weekly WEB VERSION Issue #385 • December 3, 2020 Advertisement JavaScript Speed Coding Challenge Are you ready to put your JavaScript skills to the test? Enter our JavaScript Speed Coding

Web Tools #383 - JS Utilities, React Tools, Uncategorizables

Thursday, November 19, 2020

Web Tools Weekly WEB VERSION Issue #383 • November 19, 2020 Advertisement Get a Free .design Domain Name Thinking of showcasing your design skills? Claim a free .design domain name for your website. .

Web Tools #382 - Frameworks, JSON & SQL, Vue Tools

Friday, November 13, 2020

Web Tools Weekly WEB VERSION Issue #382 • November 12, 2020 Advertisement Hyvor Talk Hyvor Talk is a commenting platform for websites. While systems like Disqus and Facebook Comments are built to show

You Might Also Like

See what Apple did to the iPads

Tuesday, May 7, 2024

Plus: A sperm whale alphabet and Oyo wants some discounted funding View this email online in your browser By Christine Hall Tuesday, May 7, 2024 Hello, and welcome back to TechCrunch PM. Today's

🍿 5 Things to Do With Your Old TVs — Ditching Google Search for Perplexity AI

Tuesday, May 7, 2024

Also: How to Turn Off Vanish Mode on Instagram, and More! How-To Geek Logo May 7, 2024 Did You Know The lens of your eye casts everything it sees upside down onto your retina; only when the image

JSK Daily for May 7, 2024

Tuesday, May 7, 2024

JSK Daily for May 7, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Building Large Scale Web Apps | A React Field Guide I had the privilege to work with Addy

Random Web App Ports, unittest, TypeIs vs TypeGuard, and More

Tuesday, May 7, 2024

`TypeIs` Does What I Thought `TypeGuard` Would Do in Python #628 – MAY 7, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo TypeIs Does What I Thought TypeGuard Would Do in Python In this post,

Daily Coding Problem: Problem #1434 [Medium]

Tuesday, May 7, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. You are given a huge list of airline ticket prices between different cities

Chaos, Coyotes & Palm Trees 🌴

Tuesday, May 7, 2024

John Mulaney helps Netflix nail its final comedic frontier. Here's a version for your browser. Hunting for the end of the long tail • May 07, 2024 Chaos, Coyotes & Palm Trees John Mulaney's

Issue 155

Tuesday, May 7, 2024

🧑‍🚀🚀 Humanity has entered the 3rd space age. Professional fraud fighter goes undercover at a “Yahoo Boy School.” The AI music app that actually makes good music. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

A very random issue

Tuesday, May 7, 2024

Plus a new language that compiles to Go, charts for the terminal, and some Go books from Packt. | #​506 — May 7, 2024 Unsub | Web Version Together with Ardan Labs Go Weekly Evolving the Go Standard

Chart | The Growth of a $1,000 Investment, by Stock Market Index 📈

Tuesday, May 7, 2024

In this graphic, we've visualized stock market growth by country over the past five years using major indices. View Online | Subscribe Presented by: Discover the motivations and behaviors of

⚙️ A new LLM for Microsoft

Tuesday, May 7, 2024

Plus: A revenue beat for Palantir & a new partnership for OpenAI ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌