Skip to content

Instantly share code, notes, and snippets.

View fedikhatib's full-sized avatar

fedix fedikhatib

  • earth
View GitHub Profile
@fedikhatib
fedikhatib / index.html
Created March 24, 2024 21:19 — forked from xav76/index.html
A CodePen by Mario Gonzalez. Canvas PS3 homescreen wave
<div id="container">
@fedikhatib
fedikhatib / mergerefs.jsx
Created April 8, 2024 01:28 — forked from cassidoo/mergerefs.jsx
Merge refs in React so a component can have more than one ref
export function mergeRefs(refs) {
return (value) => {
refs.forEach((ref) => {
if (typeof ref === "function") {
ref(value);
} else if (ref != null) {
ref.current = value;
}
});
};