←back to thread

66 points jsunderland323 | 5 comments | | HN request time: 0s | source

Hi HN, We’re Jamie & Dan, building JSX Tool (https://jsxtool.com) a new inspector/dev panel IDE that allows you to navigate to any line of your React project’s JSX with just a click and a command click to explore your render stack.

Demo video: https://www.youtube.com/watch?v=JIIXvN7vhrs

I’ve been writing React code for nearly a decade. Since I first saw source maps in the days of Babel and Redux, I’ve always wanted to be able to edit my code from the source maps. I’ve also always wanted to be able to inspect my JSX like it was HTML.

Last year, I found my first real use of AI was taking ad-hoc CSS changes in the Chrome element inspector, pasting them into ChatGPT, and asking for the equivalent in Tailwind. I’d then paste those changes into my React TSX files.

I wanted to streamline this process but came to the conclusion that to do so I needed to build a JSX inspector. I had to write a custom AST parser to create a mapping between the JSX and HTML. So I hacked on an inspector for a couple of months that connected JSX to the DOM in both directions.

The next feature was adding a CSS editor, like the one in the browser inspectors but for JSX. Unlike styling a piece of HTML I decided that any in memory style edits to a React fiber should be globally applied, as if you had tweaked that line of code in your codebase.

Finally, I was able to add the two AI features I really wanted: (1) prompt for in-memory styles for when I was pixel tweaking, and (2) save those temporary changes back to my codebase in the convention of the codebase I was working in.

To accomplish talking to the filesystem from the Chrome extension I built a little local server that mounts from the root of your project and allows the extension to send file-system commands back to your project root. We named this the “Dev Server”. (Note: You can fully use us as a JSX inspector without this server installed.)

After all that, I found that to convert myself as a user I needed it to be a pretty fully functional IDE. I needed vim bindings, I needed a typechecker, I needed auto-complete, I needed a linter, I needed code search and I needed a proper file explorer. Fortunately we were able to take advantage of the dev-server architecture we had stumbled onto in order to add an LSP server and Rip Grep. At this point, after months of dog fooding, I use JSX Tool for almost all of my website edits.

We’re still rough around the edges for mobile but we’re working on that.

All of the IDE stuff not involving AI is free and works fine without AI. We let you get a taste of the prompting stuff for free but apply some rate limits.

The extension itself is not open source but the dev server with the LSP is. It’s a great foundation if you want to build any sort of in-browser IDE and it's nearly React agnostic. Building the dev server was a big undertaking so I’d love to see someone fork it and find value in it.

In the future we want to start adding things that we are in a position to take advantage of over something like Cursor, such as letting AI give you code suggestions for runtime exceptions or work with the network logs. We think that the convenience of having your IDE in the dev panel gives us a leg up in convenience and workflow context.

Anyway, regardless of how you feel about AI coding, I wanted to make something that was useful with or without AI. We’d love it if you gave it a spin and we want to share anything we can about the technical side of the product that you might find interesting.

Show context
swyx ◴[] No.45905565[source]
is the ultimate plan to become like a "Cursor for React"?
replies(1): >>45905644 #
jsunderland323 ◴[] No.45905644[source]
Sort of. I think we want to leverage the parts of the runtime that Cursor wouldn’t be as good at. I don’t expect to replace Cursor, I expect to be better at a lot of React things that take advantage of the runtime and browser context.
replies(1): >>45906120 #
swyx ◴[] No.45906120[source]
because you're ex YC i feel ok giving some tough love that i dont think this is a good plan because cursor and v0 will eat your lunch if you get any traction, however, happy koding and may you find the thing you were meant to do.
replies(1): >>45906353 #
jsunderland323 ◴[] No.45906353{3}[source]
I don’t mind the tough love one bit. Yeah, could happen. Startups just aren’t defensible creatures, especially in the post network effect world of AI. But having spent a bit of time in the world of startups (I worked at YC), I think it’s easy to forget that people build in an incumbent’s space all the time... and yes, usually those startups get killed. But by your logic, Cursor should not exist. We should all be using GitHub copilot. The browser IDE is really a new category so I think it will be somewhat awkward for any incumbent.

To be clear, I fully expect Vercel to launch something and for them to have the best distribution in the world. I don’t think they will ever support Vite or things that aren’t Next but que sera sera.

replies(1): >>45907000 #
1. ontouchstart ◴[] No.45907000{4}[source]
It is going to be a very competitive market but you still have a chance if you serve the needs of professional React development. Unlike POC and MVP projects by people who are learning React, professional React projects that serve production are very complex. Developers need to deliver features without regression, debug with whatever tools they have to find out root cause and fix the bug without causing regression and more issues. Tight unit tests, integration tests and QA cycles.

I have been using Cursor + Claude (Composer) in production code base with some success. Integrations with live React DevTools in the browser could make UI debugging and iterative development much faster. But you also need to think outside of the box of IDE. It is never about IDE. It is about high quality workflow.

replies(1): >>45907089 #
2. jsunderland323 ◴[] No.45907089[source]
>you still have a chance if you serve the needs of professional React development

That's my entire thesis. I think it's a long long road. But I think you've actually done a great job of pretty much seeing the whole vision.

replies(1): >>45907177 #
3. ontouchstart ◴[] No.45907177[source]
That is why Playwright might be a critical piece of the puzzle instead of good to have.

I have instructed agent to generate Playwright test from screenshots that will dump API calls to debug and generate mocks to trigger the edge cases bugs. I am sure if jstool is there, it can fix the bug and reload.

replies(1): >>45907402 #
4. jsunderland323 ◴[] No.45907402{3}[source]
To be clear, I'm with you 100%. You have my word that I will add in playwright when we get to a point where we can support it.
replies(1): >>45907470 #
5. ontouchstart ◴[] No.45907470{4}[source]
If you can build browser automation into jsxtool, perhaps it can replace playwright. If I remember correctly, the guys who developed puppeteer/playwright used to work for chrome devTools or something.