Instead of using libs for envs, you can use this simple type-safe variant and forget about envs validation.
The post from this tweet Click hereπ
The post from this tweet Click hereπ
π₯°1π1
π react-emoji-toggle-button is available now!
A lightweight and customizable emoji picker built for modern React applications.
β¨ Key Features:
β Light & Dark Themes
β English & Arabic UI Support
β Recent & Flag Emojis
β Filter Bad Emojis
β Fully Customizable Styles & Sizes
β Easy Integration with any input field
Perfect for chat apps, comment sections, and any interactive UI that deserves an expressive touch! π¬π
π Live Demo:
https://mahmoud-walid.github.io/react-emoji-toggle-button/
π¦ Install via npm:
π GitHub:
https://github.com/Mahmoud-walid/react-emoji-toggle-button
If you like it, donβt forget to βοΈ the repo and share it with fellow developers! π
Bring emojis to life in your app today! π§βπ»π
A lightweight and customizable emoji picker built for modern React applications.
β¨ Key Features:
β Light & Dark Themes
β English & Arabic UI Support
β Recent & Flag Emojis
β Filter Bad Emojis
β Fully Customizable Styles & Sizes
β Easy Integration with any input field
Perfect for chat apps, comment sections, and any interactive UI that deserves an expressive touch! π¬π
π Live Demo:
https://mahmoud-walid.github.io/react-emoji-toggle-button/
π¦ Install via npm:
npm i react-emoji-toggle-button
π GitHub:
https://github.com/Mahmoud-walid/react-emoji-toggle-button
If you like it, donβt forget to βοΈ the repo and share it with fellow developers! π
Bring emojis to life in your app today! π§βπ»π
β€3π₯°1π1
π React has its own MurmurHash3 implementationβ¦ and itβs hidden in plain sight!
Inside the React source code, there's a little gem of an implementation tucked away in createFastHashJS.js. This file contain a pure JavaScript, Sync, non-cryptographic hashing function based on MurmurHash3 (32-bit).
βWhy does React need this ?
React uses this fast hash internally β- for example, to hash key paths used in
These hashes are used to track state transitions, cache component branches, or generate unique keys.
βWhy not use Web Crypto?
The browserβs
β MurmurHash3: The best choice
This version comes from Gary Court's highly respected JS port of the MurmurHash3 algorithm.
π¦ Use Cases in environments like React.
- Component key path hashing.
- Action state deduplication.
- Deterministic memoization cache keys.
- Static asset naming (in build tools).
- ID generation in SSR contexts.
π Important warning
This hash is not cryptographically secure. Itβs optimized for speed and determinism, not protection. Donβt use it for passwords, tokens, or anything sensitive!
ββββββ-
β¨ This is one of those internal utilities that reminds us: even in massive projects like React, simplicity often wins when performance is king π
ββββββ-
πLinks
createFastHashJS.js
MurmurHash
Inside the React source code, there's a little gem of an implementation tucked away in createFastHashJS.js. This file contain a pure JavaScript, Sync, non-cryptographic hashing function based on MurmurHash3 (32-bit).
export function createFastHashJS(key: string): number {
return murmurhash3_32_gc(key, 0);
}
βWhy does React need this ?
React uses this fast hash internally β- for example, to hash key paths used in
useActionState
when handling MPA-style from submissions.These hashes are used to track state transitions, cache component branches, or generate unique keys.
βWhy not use Web Crypto?
The browserβs
crypto.subtle.digest()
is asynchronous, which makes it unsuitable in React performance-critical paths where synchronous execution is essential to avoid choppy renders and high context-switching costs.β MurmurHash3: The best choice
This version comes from Gary Court's highly respected JS port of the MurmurHash3 algorithm.
π¦ Use Cases in environments like React.
- Component key path hashing.
- Action state deduplication.
- Deterministic memoization cache keys.
- Static asset naming (in build tools).
- ID generation in SSR contexts.
π Important warning
This hash is not cryptographically secure. Itβs optimized for speed and determinism, not protection. Donβt use it for passwords, tokens, or anything sensitive!
ββββββ-
β¨ This is one of those internal utilities that reminds us: even in massive projects like React, simplicity often wins when performance is king π
ββββββ-
πLinks
createFastHashJS.js
MurmurHash
β€2π1