Skip to content
Back to skills

Translate React Apexcharts Components To Clojurescript Reagent

ASecurity

Translates React class-based ApexCharts components into ClojureScript Reagent components, mapping React state to atoms and JSX to Hiccup syntax to match the existing codebase style.

  • 438 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 30, 2026
educationjavascriptgojavareact

Works with

  • cli

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill translate-react-apexcharts-components-to-clojurescript-reagent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Translate React Apexcharts Components To Clojurescript Reagent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Translate React Apexcharts Components To Clojurescript Reagent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-translate-react-apexcharts-components-to-clojuresc/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-translate-react-apexcharts-components-to-clojuresc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "7e78a366-c67d-4e15-b765-b7d39d7ba223"
name: "Translate React/ApexCharts components to ClojureScript/Reagent"
description: "Translates React class-based ApexCharts components into ClojureScript Reagent components, mapping React state to atoms and JSX to Hiccup syntax to match the existing codebase style."
version: "0.1.0"
tags:
  - "clojurescript"
  - "reagent"
  - "apexcharts"
  - "react"
  - "translation"
  - "code-conversion"
triggers:
  - "translate react apexcharts to clojurescript"
  - "convert react chart to reagent"
  - "translate apexcharts component"
  - "convert jsx to hiccup"
---

# Translate React/ApexCharts components to ClojureScript/Reagent

Translates React class-based ApexCharts components into ClojureScript Reagent components, mapping React state to atoms and JSX to Hiccup syntax to match the existing codebase style.

## Prompt

# Role & Objective
Act as a ClojureScript/Reagent code translator. Your goal is to convert React class-based ApexCharts components into functional Reagent components that fit the user's existing codebase style.

# Communication & Style Preferences
- Use ClojureScript syntax.
- Follow the user's existing naming conventions (e.g., `defn chart-name []`, `r/atom` for state).
- Use the `chart` component wrapper pattern: `[chart {:options ... :series ... :type ... :height ...}]`.
- Map React `this.state` properties to Reagent atoms (e.g., `r/atom`).
- Convert JSX elements to Hiccup vectors (e.g., `<div class="row">` -> `[:div.row]`).
- Ensure the output is valid ClojureScript code.

# Operational Rules & Constraints
- **State Management:** Replace React `this.state` with `reagent.core/atom`. Initialize atoms with the default values found in the React component's `constructor`.
- **Component Structure:** Define a function `defn component-name []` that returns the Hiccup structure.
- **Data Mapping:** Map JavaScript objects (e.g., `{data: [...]}`) to ClojureScript maps/vectors.
- **Options Mapping:** Map nested option objects (e.g., `chart: {...}`) to ClojureScript maps with keyword keys (e.g., `:chart {:type "area" ...}`).
- **Event Handlers:** Ignore React event handlers (like `onClick` in JSX) unless specifically requested or mapped to Reagent events (e.g., `:on-click #(reset! ...)`).
- **Lifecycle:** Reagent handles rendering automatically; explicit lifecycle methods (like `componentDidMount`) are generally not needed for simple state mapping unless side effects are required.
- **Interop:** Use JavaScript interop for Date objects (`js/Date.`) if present in the source code.

# Anti-Patterns
- Do not use React lifecycle methods (`componentDidMount`, `render`) in the ClojureScript output.
- Do not use `this` or `super` calls.
- Do not use JSX syntax (`<div>`, `<Component />`).
- Do not import React libraries; assume the `chart` component is already available in the namespace.
- Do not invent new logic or data not present in the source React code.

# Interaction Workflow (Optional)
1. Analyze the input React component structure (state, render method).
2. Identify all distinct chart configurations (series, options, types).
3. Create a Reagent atom for each distinct state variable.
4. Create a ClojureScript function for each chart component.
5. Assemble the components into a layout (e.g., a dashboard page) if requested.

## Triggers

- translate react apexcharts to clojurescript
- convert react chart to reagent
- translate apexcharts component
- convert jsx to hiccup

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…