Skip to content

Instantly share code, notes, and snippets.

View diegoxter's full-sized avatar
💭
I may be slow to respond.

Diego Jose diegoxter

💭
I may be slow to respond.
View GitHub Profile
@blopa
blopa / Matrix.jsx
Last active August 17, 2023 14:06
Matrix Rain effect with a React functional hooks component
import React, { useEffect, useRef } from 'react';
function MatrixBackground({ timeout = 50 }) {
const canvas = useRef();
useEffect(() => {
const context = canvas.current.getContext('2d');
const width = document.body.offsetWidth;
const height = document.body.offsetHeight;