js-hoist-regexp

Community

Hoist RegExp creation to optimize React renders

AuthorTheOrcDev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps developers avoid costly RegExp creation inside render by hoisting to module scope or memoizing with useMemo, resulting in more predictable and efficient React components.

Core Features & Use Cases

  • Hoist RegExp creation to module scope to reuse a single instance.
  • Memoize dynamic RegExp with useMemo to recompute only when inputs change.
  • Avoid lastIndex-related bugs by not using global /g patterns inside frequently rendered code.

Quick Start

Start by placing a reusable RegExp at module scope or wrapping its creation in useMemo in your React components and utilities.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: js-hoist-regexp
Download link: https://github.com/TheOrcDev/8bitcn-ui/archive/main.zip#js-hoist-regexp

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.