Skip to content

Instantly share code, notes, and snippets.

View dalechyn's full-sized avatar
🏠
Working from home

Vladyslav Dalechyn dalechyn

🏠
Working from home
View GitHub Profile
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@aquiseb
aquiseb / commit-msg.md
Last active January 30, 2024 08:45
Husky Node.js - Git commit prepend issue tag to commit message

Automatically prepend issue tag to commit message

From the following tutorial

Consistency is a very important factor in software development.

But because different developers have different experiences and preferences it takes some time and effort to achieve consistency in projects.

A solution to that are discussed and then tool-enforced rules. Some solutions to that are linters, code formatters, checks on the CI and code reviews.

@kachar
kachar / Link-Next13.tsx
Last active July 5, 2024 06:10
Next.js Link + Material UI Link/Button components bundled with forwardRef
import { getAddress } from 'viem'
import { z } from 'zod'
export const address = z
.string()
.transform((val, ctx) => {
try {
return getAddress(val.toLowerCase())
} catch {
ctx.addIssue({