Embedding interactive node graphs and diagram editors in React applications limited
React Flow → Rete.js
Can replace the visual React node-editor layer when application-defined processing is appropriate; does not provide API or graph-format interchange with Rete.
Building processing-oriented visual node editors and graph applications limited
Rete.js → React Flow
Can replace a node-editor interface where dedicated graph-processing modules and selectable renderers fit the application; requires different components, data and serialization.
Rete.js can substitute for React Flow when a project needs a configurable node editor alongside explicit dataflow or control-flow modules. React Flow offers a React-centered visual component model. Moving between them requires reworking graph data, node rendering and execution integration; their shared visual metaphor does not establish file or API compatibility. No implementation or migration test was performed for this article.[1][3][9]
Overview
Rete.js is a TypeScript-first framework for building node-based editors with application-defined processing. Its plugin architecture separates editor data, visual rendering and graph execution. It can support visual-programming interfaces, but an application must still define its nodes, processing rules and persistence format.[1][3][5]
Editor composition
The basic guide creates a NodeEditor, attaches an area plugin and adds a renderer plus an interactive connection plugin. Its React example uses a classic visual preset, while other renderers serve different frameworks. Node insertion is asynchronous. This modular arrangement makes an editor adaptable, but also means the core package alone is not a finished visual application. Generated setup code must include the appropriate plugins and await operations where required.[2]
Processing semantics
The engine package supports two distinct approaches. In dataflow, a target requests predecessor outputs and a node's data method computes its result. In control flow, an execute method chooses how to forward control through outgoing connections. Applications can combine the approaches using different ports. The presence of visible connections does not define business logic automatically: node implementations determine what the graph actually does.[3]
Headless execution and cached results
The dataflow guide demonstrates processing-only nodes without a user interface, including server-side use. Outputs are cached to avoid repeating computation. Changing an input value requires resetting the relevant cache before fetching a new result; otherwise visual edits and computed values can diverge. Data methods may be asynchronous, and downstream processing waits for the required inputs. These behaviors need to be reflected in the application's update flow.[4]
Saving a graph
The current editor does not provide general import/export by default. Nodes and connections may be plain objects, class instances, functions or cyclic structures, so ordinary JSON conversion cannot preserve every supported model. The guide outlines application-specific serialization and reconstruction of node instances, ports and controls. Its sample is an approximation rather than a complete persistence implementation. A saved representation therefore needs a compatible reader and node definitions; it is not a universal interchange format.[5]
Validation hooks
Pipes can intercept node creation/removal and connection creation/removal. Returning no context can prevent an operation from continuing, allowing checks such as whether a required start node exists or whether sockets are compatible. Those rules are application-defined. TypeScript declarations and a successfully drawn connection should not be mistaken for proof that a graph satisfies the application's semantic constraints.[6]
Core and advanced-plugin licenses
The core repository uses MIT terms with notice retention. However, the project's licensing page names rete-structures and rete-scopes-plugin as advanced packages under CC BY-NC-SA 4.0 and says commercial use is not currently permitted through a dual-license option. An MIT label on the core must not be extended to every optional package. Commercial adopters need to inspect the actual plugin set and avoid treating those noncommercial extensions as ordinary permissive dependencies.[7][8]
Capabilities & limitations
Modular visual editor
supported
Core editor, area, renderer and connection plugins compose the UI.[2]
Building processing-oriented visual node editors and graph applications · Web, TypeScript, JavaScript, React, Vue, Angular, Svelte, Node.js · Version, build and integration requirements apply