Skip to content

Instantly share code, notes, and snippets.

View jcampuza's full-sized avatar
🎯
This is new

Joseph Campuzano jcampuza

🎯
This is new
View GitHub Profile
@sliptype
sliptype / Test.tsx
Created June 14, 2019 16:12
Testing React components using Redux Hooks with Jest
import { render, cleanup } from '@testing-library/react';
import { useSelector } from 'react-redux';
import { when } from 'jest-when';
import { getValue } from 'selectors';
jest.mock('react-redux');
afterEach(cleanup);
@alvinsng
alvinsng / no-use-effect.md
Created March 17, 2026 20:00
Skill generated by Factory Droid
name no-use-effect
description Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch.

No useEffect