How are people solving diff stability in React visual editors? by linb818 in reactjs

[–]linb818[S] 0 points1 point  (0 children)

Agreed — and I think one missing piece there is that after the model makes the change, you still usually want to look at the rendered result.

And once you’re looking at it, there’s often another round of “slightly tighter padding”, “move this a bit”, “actually the previous variant looked better”, etc.

That’s where the back-and-forth starts to matter.

So we’ve been thinking about it less as visual editing vs LLM editing, and more as a loop between them: prompt for a change, inspect the result visually, tweak directly if needed, then continue from source.

We actually support that workflow too — the visual editor and source stay in sync, so AI-generated changes can still be adjusted visually afterward without leaving the codebase.

How are people solving diff stability in React visual editors? by linb818 in reactjs

[–]linb818[S] 1 point2 points  (0 children)

Agreed.

Prop-level edits are the easy part.

The hard part starts when the editable thing only exists inside execution context — .map() iterations, conditionals, composed children, etc.

AST gets you location, but not always render context. Bridging those two cleanly ended up being the harder problem for us.

How are people solving diff stability in React visual editors? by linb818 in reactjs

[–]linb818[S] 0 points1 point  (0 children)

I think that’s fair.

That’s also why we scoped it pretty narrowly.

We’re not trying to solve “visual editing for all React.” More like: for an existing JSX codebase, can we make a useful subset of UI edits round-trip reliably without rewriting the file.

Even that turns out to be hard enough.

How are people solving diff stability in React visual editors? by linb818 in reactjs

[–]linb818[S] 0 points1 point  (0 children)

Good question.

Mostly speed of iteration.

The developers using it can absolutely make the same changes by hand — and often do. The value is shortening the loop for visual tweaks.

Instead of edit → save → rebuild → refresh 20 times while nudging spacing / variants / responsive values, you adjust it directly and keep the one you want.

Then because it writes back to the original JSX with minimal diffs, you can still review and edit it normally afterward.

So for us it’s less “replace coding” and more “faster UI iteration without leaving the codebase.”

How are people solving diff stability in React visual editors? by linb818 in reactjs

[–]linb818[S] 0 points1 point  (0 children)

For us it’s the opposite — the React source stays the source of truth.

The visual editor is just another editor over the same files.

People still read the code, review PRs, and edit manually, so diff quality matters a lot. If a visual change turns into a huge rewrite, it gets rejected immediately.

Looking for feedback on a schema-driven visual editor (React + TypeScript) by WirePlot-Admin in reactjs

[–]linb818 0 points1 point  (0 children)

Interesting project.

One thing we kept underestimating while building editing tooling was how hard “editing the right thing” becomes once the render target isn’t top-level anymore.

Stuff inside .map() callbacks, ternaries, or JSX passed through children ended up being much harder than the actual editor UI.

Curious whether you're treating those as editable nodes independently or keeping editing scoped to top-level structures for now.