set-up-modus-event-listeners

Community

Wire Modus events in React with safe cleanup.

Authorjulianoczkowski
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Streamline and standardize the setup and cleanup of Modus web component event listeners inside React components, reducing boilerplate and avoiding memory leaks.

Core Features & Use Cases

  • Null-checks the target Modus component reference before attaching listeners to prevent runtime errors.
  • Attaches listeners conditionally based on provided React props, enabling flexible event handling.
  • Ensures proper cleanup on unmount to prevent leaks and stale handlers.
  • Supports typed event handlers for strong TypeScript guarantees and easier maintenance.

Quick Start

Wrap a Modus web component in a React component and attach listeners using useEffect with a cleanup function.

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: set-up-modus-event-listeners
Download link: https://github.com/julianoczkowski/create-trimble-app/archive/main.zip#set-up-modus-event-listeners

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.