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

Web Tools Weekly
WEB VERSION
Tools for Web Developers

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 Challenge and see how you stack up among the world’s top developers.

REWARDS:
1st Place: Apple AirPods
2nd – 5th Place: $100 Amazon gift card
6th – 20th Place: $20 Amazon gift card
Click Here to Get Started
JavaScript Speed Coding Challenge

The input and change events are quite common when manipulating data entered in form controls, and I've discussed those here many times. A new one that's been added to the spec that's supported in all modern browsers except Firefox is called beforeinput.

The beforeinput event can be applied to input, select, and textarea elements as well as any element with contenteditable or designMode enabled (i.e. anything that takes input). Here's how the spec describes input and beforeinput so you can see the subtle difference (which is somewhat obvious from the name):

  • input - "A user agent MUST dispatch this event immediately after the DOM has been updated."
  • beforeinput - "A user agent MUST dispatch this event when the DOM is about to be updated."
The difference between the two is kind of strange when you use them both for logging the values in the field.

Try this CodePen demo to see what I mean.

Make sure you use Chrome or Edge or another browser that supports beforeinput. Notice that the first input that logs the value seems to always be behind a keystroke. If you think about it, this makes sense. The event is supposedly firing "before" any data is input. So the first thing it does is enter nothing (which is the default value of the field). Then it logs each previous value "before" each successive keystroke.

This makes more sense if you add a default value to the first input. Then you'll see that default value appear on first keystroke, after which the new value will appear, and so on with each keystroke.

Meanwhile, the input event used on the second form field works perfectly for this purpose – it logs the value in real-time, as you would expect. Clearly, the beforeinput event is the wrong tool for the job if you're intending to log what's being typed. But this should serve to demonstrate what the event does. If you need to perform an action while the user is typing something but before that 'input' is finalized, then beforeinput would be the right tool for the job.

As mentioned, Firefox is the main culprit in lack of support at the moment but it looks like it's on track to be added soon.
 

Now on to this week's tools!

JavaScript Utilities

JavaScript Speed Coding Challenge
Are you ready to put your JavaScript skills to the test? Enter our JavaScript Speed Coding Challenge and see how you stack up among the world’s top developers. sponsored 

p-state
Inspect the state of a promise, which might come in handy in the rare case before doing a heavy operation or for assertions when writing tests.

Planton
A database-agnostic task scheduler that abstracts logic for handling concurrency and different task scheduling strategies.

promisify-4loc
Convert a Node-style callback API to a Promise, similar to an older tool but implemented in just four lines of code, with only the core functionality provided.

Valtio
Makes proxy-state simple for React and vanilla JavaScript.

utfu
Replaces busted characters carried over from legacy text encodings with the proper UTF-8 characters.

joi
A powerful schema description language and data validation library for JavaScript.

XActor
An actor model implementation for JavaScript and TypeScript, heavily inspired by Akka. It represents the "actor model" parts of XState and can be used with or without XState.

panzoom
Extensible, mobile friendly pan and zoom framework (supports DOM and SVG). Demo here.

panzoom

redaxios
The Axios API as an 800 byte Fetch wrapper.

Mutik
A tiny (495B) immutable state management library based on Immer.

web-worker
Native cross-platform Web Workers. Works in published npm modules.

Svelte-Convert
Convert a Svelte component to a Vue or React component, with SSR support.

Seafox
A blazing fast 100% spec compliant, self-hosted JavaScript parser written in TypeScript.

VS Code, IDEs, Text Editors, etc.

Tech Productivity Newsletter
A brief weekly newsletter sent out every Monday that features productivity tools and articles on efficiency, well-being, remote work, and more.   promoted

React Icons
Search for icons for React from a number of different icon libraries, right from inside VS Code.

Paircast
For those hiring developers, this is a service that provides streamlined technical take-homes for Applicant Tracking Systems (ATS).  Records developers' screen, video, and code changes while they complete 1-hour coding projects.

Serenade
A powerful tool to enable writing code using natural speech (i.e. voice coding).

Adobe XD for VS Code
VS Code extension that allows developers to visually map design sources, created in Adobe XD and available in Creative Cloud Libraries, to platform-specific code using design tokens.

Microsoft Edge Tools for VS Code
Use the Microsoft Edge Dev Tools from within VS Code to see your site's runtime HTML structure, alter its layout, fix styling issues as well as see your site's network requests.

Uivonim
A fork of Veonim but without the reliance on VS Code extensions.

Vuln Cost
An open source security scanner for VS Code. Find security vulnerabilities in npm packages while you code. Receive inline feedback such as how many vulnerabilities a package contains.

reply.vim
A Vim and Neovim plugin to make edit buffers play with REPLs nicely. More than 40 REPLs are supported by default, and you can add your own.

Project Manager
VS Code extension to allow you to easily manage and switch between projects.

Project Manager

Emmet for Sublime Text
Emmet, the popular front-end workflow tool, is now at version 2.

Import Cost
VS Code extension to display the size of an imported package. Utilizes webpack with babili-webpack-plugin in order to detect the imported size.
 

React Tools

Concent
Simple, predictable, progressive, and efficient state management tailored for React.

beautiful-react-diagrams
A collection of lightweight React components and hooks to build diagrams with ease.

Tippy.js for React
A React component for Tippy.js, the tooltip, popover, dropdown, and menu solution powered by Popper.

react-dropdown-tree-select
A lightweight and fast control for React to render a select component that can display hierarchical tree data.

React Simple Maps
Now at version 2+. Create beautiful SVG maps in React with d3-geo and TopoJSON using a declarative API.
 
React Simple Maps

React Easy Edit
A React library that adds inline "click to edit" functionality on HTML form elements, with validation for user input and customizations to include save and cancel buttons.

React FilePond
A wrapper component for FilePond, the "upload anything" utility with optimization and accessibility features.

Fresh
A highly opinionated forms library for React with a dead simple API.

react-cropper
A React component for Cropper.js, the popular utility for cropping/framing an image on the page.

react-use-pip
A React hook for using the Picture-in-Picture API, a still-in-flux standard.

use-fauna
React hooks for interacting with Fauna databases.

MUI-Datatables
A responsive data table component built on Material-UI that includes features like filtering, resizable columns, view/hide columns, draggable columns, search, and more.

A Tweet for Thought

This is great advice for when on vacation and especially if it's a "staycation"  where you're not actually traveling but still dependent on your electronic devices.

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 staying home a lot and have some LEGO on hand, you might enjoy Rebrickable, a website that shows you which LEGO sets you can build from the sets and parts you already own.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

PayPal.me/WebToolsWeekly | Support Me on Patreon | Sponsor Me on GitHub

Older messages

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

Web Tools #381 - JS Promises, React Tools, SVG, Git/CLI

Thursday, November 5, 2020

Web Tools Weekly WEB VERSION Issue #381 • November 5, 2020 Advertisement Cubbit for Teams Cubbit for Teams is the first cloud storage for businesses not running on data centers but on a distributed

Web Tools #380 - Testing Tools, JS Libraries, Misc. Tools

Thursday, October 29, 2020

Web Tools Weekly WEB VERSION Issue #380 • October 29, 2020 Advertisement Cut Your IT Bills in Half No surprise invoices, no lock-in, and same price across 11 global data centers. Industry-leading price

Web Tools #379 - CodeLobster IDE, CSS Tools, Build Tools, Git/CLI

Thursday, October 22, 2020

Web Tools Weekly WEB VERSION Issue #379 • October 22, 2020 The following intro is a paid product review for CodeLobster, a free cross-platform IDE for PHP, HTML, CSS, and JS development. There's no

You Might Also Like

🕹️ Retro Consoles Worth Collecting While You Still Can — Is Last Year's Flagship Phone Worth Your Money?

Saturday, November 23, 2024

Also: Best Outdoor Smart Plugs, and More! How-To Geek Logo November 23, 2024 Did You Know After the "flair" that servers wore—buttons and other adornments—was made the butt of a joke in the

JSK Daily for Nov 23, 2024

Saturday, November 23, 2024

JSK Daily for Nov 23, 2024 View this email in your browser A community curated daily e-mail of JavaScript news React E-Commerce App for Digital Products: Part 4 (Creating the Home Page) This component

Not Ready For The Camera 📸

Saturday, November 23, 2024

What (and who) video-based social media leaves out. Here's a version for your browser. Hunting for the end of the long tail • November 23, 2024 Not Ready For The Camera Why hasn't video

Daily Coding Problem: Problem #1617 [Easy]

Saturday, November 23, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. You are given an string representing the initial conditions of some dominoes.

Ranked | The Tallest and Shortest Countries, by Average Height 📏

Saturday, November 23, 2024

These two maps compare the world's tallest countries, and the world's shortest countries, by average height. View Online | Subscribe | Download Our App TIME IS RUNNING OUT There's just 3

⚙️ Your own Personal AI Agent, for Everything

Saturday, November 23, 2024

November 23, 2024 | Read Online Subscribe | Advertise Good Morning. Welcome to this special edition of The Deep View, brought to you in collaboration with Convergence. Imagine if you had a digital

Educational Byte: Are Privacy Coins Like Monero and Zcash Legal?

Saturday, November 23, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 23, 2024? The HackerNoon

🐍 New Python tutorials on Real Python

Saturday, November 23, 2024

Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: Black Friday Giveaway @ Real Python This Black

Re: Hackers may have stolen everyone's SSN!

Saturday, November 23, 2024

I wanted to make sure you saw Incogni's Black Friday deal, which is exclusively available for iPhone Life readers. Use coupon code IPHONELIFE to save 58%. Here's why we recommend Incogni for

North Korean Hackers Steal $10M with AI-Driven Scams and Malware on LinkedIn

Saturday, November 23, 2024

THN Daily Updates Newsletter cover Generative AI For Dummies ($18.00 Value) FREE for a Limited Time Generate a personal assistant with generative AI Download Now Sponsored LATEST NEWS Nov 23, 2024