React-Ace

A React component wrapper around the Ace code editor, with split and diff editing modes built in

Library
npm
v15.0.0
4,205stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
79/100Good
Development Activity72
Maintenance72
Community72
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture76
Code Quality78
Innovation68
Learning Curve82

React-Ace wraps the battle-tested Ace code editor as an idiomatic React component, exposing its syntax highlighting, autocompletion, and validation features through simple props instead of manual DOM wiring. It ships three exports for the common editor shapes teams need: a standard single-pane AceEditor, a Split component for side-by-side panes, and a Diff component for two-way diff views, all sharing the same underlying option and event-binding logic.

Because it targets ace-builds directly (as of v8, dropping the older brace fork), consumers pull in only the modes, themes, and extensions they import, keeping bundle size predictable. The component surface covers the vast majority of Ace’s configuration through typed props (mode, theme, fontSize, setOptions, commands, markers, annotations) plus lifecycle callbacks (onChange, onValidate, onLoad, onCursorChange) that map onto Ace’s own event system, making it a drop-in choice for building code editors, config editors, and IDE-style panels inside React apps.

What You Get

  • AceEditor, the default export, for a single-pane code editor with full prop-driven configuration (mode, theme, fontSize, tabSize, autocompletion, snippets, markers, annotations)
  • Split, a side-by-side dual-pane editor built on the same option/event pipeline, useful for comparing or synchronizing two buffers
  • Diff, a two-way diff editor built on ace-builds’ diff extension plus diff-match-patch, for rendering inline code differences
  • A large set of typed lifecycle and interaction callbacks (onChange, onValidate, onCursorChange, onSelectionChange, onPaste, onCopy, onScroll, onLoad, onBeforeLoad) that mirror Ace’s native events
  • Debounced change handling via debounceChangePeriod, and SSR-safe initialization that falls back to a non-window Ace instance

Common Use Cases

  • Embedding a syntax-highlighted code editor in an internal tool, admin panel, or documentation playground
  • Building a JSON/YAML/config editor with live validation via onValidate and inline annotations
  • Rendering side-by-side or diff views of two code snippets in a code-review or version-comparison UI
  • Powering the code-input pane of an online IDE, REPL, or coding-challenge platform

Under The Hood

Architecture React-Ace centers on three top-level components (ace.tsx, split.tsx, diff.tsx) that each wire an Ace editor instance to React’s lifecycle: componentDidMount performs one-time setup (ace.edit(), binding editor options, and event listeners for change/focus/blur/copy/paste/selection/cursor/scroll), while componentDidUpdate diffs incoming props against the previous props to call only the matching Ace setter (setOption, setTheme, setFontSize, etc.) for whatever actually changed, avoiding a full editor re-render on every prop update. Shared logic — the list of bindable editorOptions/editorEvents, a debounce helper, and getAceInstance() for SSR-safe access to the ace-builds module — lives in editorOptions.ts and is imported by all three components, avoiding duplication across the editor “shapes.”

Tech Stack The library is TypeScript-first (full IAceEditorProps typing in types.ts), built with tsdown targeting dual CJS/ESM output declared via package.json’s exports map. It depends on ace-builds (the editor engine itself, replacing the older brace fork as of v8), diff-match-patch for the diff view, fast-equals for cheap prop comparison in componentDidUpdate, and prop-types for runtime validation alongside the TS types. React and react-dom are peer dependencies spanning 0.13 through 19, reflecting the project’s maintenance history since 2014.

Code Quality Testing is substantial: tests/src/ace.spec.tsx (1059 lines) and split.spec.tsx (826 lines) use Vitest and Testing Library to cover prop updates, event callbacks, and option changes. Linting runs through oxlint rather than ESLint, and typechecking is a separate tsc --noEmit step wired into the check script. Class-based components (rather than hooks) and some loosely-typed event handlers reflect the codebase’s age, but public prop types are fully declared and naming stays consistent across all three editor components.

API Design The prop-driven API needs very little boilerplate — a single <AceEditor mode="java" theme="github" onChange={fn} /> renders a working editor, with sensible defaults (500px height/width, tabSize 4, autocompletion off) baked into defaultProps. Callback names mirror Ace’s own events 1:1 (onChange, onValidate, onCursorChange), shortening the learning curve for anyone who has touched Ace before. Escape hatches (onLoad exposing the raw editor, onBeforeLoad exposing the raw ace module) mean advanced users aren’t blocked by the prop surface, at the cost of leaking an imperative API into an otherwise declarative component.

Used by 7 apps in this directory

TypeScript
97%
Other

GrowthBook

Developer Tools · Analytics · Monitoring

8,138

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript97%
Updated today
Python
68%
MIT

Langflow

AI Agents · AI Development

153,450

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
66
Dependency
Built with
Python68%
TypeScript22%
Updated today
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,618

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
53
Repo Health
66
Technical
64
Dependency
Built with
TypeScript94%
Updated 1 months ago
TypeScript
96%
Other

Lightdash

Analytics · Data Engineering

6,056

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
66
Dependency
Built with
TypeScript96%
Updated today
Go
74%
Other

Notifuse

Marketing

2,048

Open-source, self-hosted alternative to Mailchimp, Brevo, and Klaviyo — send newsletters and transactional emails without per-email pricing or vendor lock-in.

View details
82
Repo Health
80
Technical
68
Dependency
Built with
Go74%
TypeScript23%
Updated yesterday
Python
45%
Other

Redash

Analytics · Data Engineering

28,754

Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.

View details
85
Repo Health
74
Technical
61
Dependency
Built with
Python45%
JavaScript31%
TypeScript17%
Updated yesterday
TypeScript
56%
AGPL 3.0

Responsively App

Design Tools · Developer Tools

25,119

Preview and interact with your responsive web design across every device size simultaneously — no more manual resizing.

View details
67
Repo Health
71
Technical
69
Dependency
Built with
TypeScript56%
JavaScript42%
Updated 2 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search