I was inspired by @FineFindus and @hbons to post a bit more on what I'm working on, so here goes!!

I have been working on [Peachy](https://gitlab.gnome.org/vixalien/peachy), a small framework to write GNOME/Linux applications with GTK and React (yes!).

For dogfooding, I've been prototyping a little Hacker News client, since they have a nice and free API with a small scope.

Through the way, I've been adding features to Peachy such as supporting List/Grid views, polyfills etc

#gjs #gnome #react #linux #gtk #hn

@FineFindus @hbons I've also been working VERY slowly on a rewrite of [Sticky Notes](https://flathub.org/en/apps/com.vixalien.sticky).

The upcoming version will store notes as markdown, meaning the data will be easier to store/backup/sync across different devices and applications.

Currently, I've managed to implement storing an AST of the notes, and syncing it with the GTK text view widget.

#gnome #gtk #sticky #lezer #markdown

An advantage of Peachy is that it allows us to use regular* npm packages, in this case we are using the markdown parser from the Lezer/Codemirror project (https://lezer.codemirror.net/)!
Lezer

Incremental parsing system

@vixalientoots @FineFindus this would be perfect if I can store them in a folder and sync with the upcoming #SparkleShare rewrite. :)
@vixalientoots @FineFindus @hbons is the reason for wanting to write GTK apps in React so that there can be more shared code across the native and web versions of an app?

RE: https://mas.to/@vixalientoots/116284503838003434

@sashin @FineFindus @hbons not really, it just makes it easier to write GTK applications (DX-wise) with less glue and boilerplate in my experience

See also

@vixalientoots @sashin @hbons I imagine it also has the advantage of being familar to lots of web developers, which could make it easier for them to get into native app development.
@FineFindus @sashin @hbons yeah that's also a fact! I should probably create a FAQ in the docs
@vixalientoots What would you say is your main reason for making this? What do you think the GTK workflow lacks for you? Very cool to see in any case, hot reloading sounds interesting 

@monster better DX, and using the tools/ecosystem that were originally built for react/web/npm etc...

One thing I heavily dislike in GTK apps is that UI is usually decoupled from the logic (GtkBuilder XML, blueprint) and you need to link them manually.

React allows us to build the user interfaces declaratively and reactively, where they're coupled together. This also unlocks a multitude of packages (e.g. zustand, wouter, plugins https://registry.vite.dev/plugins etc...)

Vite Plugin Registry

Discover plugins for Vite, Rolldown, and Rollup

@vixalientoots @monster this is so cool. If support for all the gtk features is complete this could very easily have better DX than blueprint currently has. (or probably it has already..) imo the big problem of gjs was always that there is no existing language ecosystem to piggyback on, (you can use node libraries afaik, but its not as well integrated), so this would change that fundamental problem.
@vixalientoots btw is there a matrix chatroom for peach or somewhere to lurk to see the progress? :)
@monster
@lw64 @monster Yeah, we do hang out here often: #typescript:gnome.org

@lw64 @monster yes, better DX is the goal.

And by the way, peachy builds on react, GJS, GTK, rolldown so it natively supports most of their features natively, except stuff that needs plumbing between them like HMR, Suspense, CSS imports, Resources, etc...

But otherwise most of the stuff works already

@vixalientoots @monster that sounds super nice! If I had time and an idea for an app right now I would use this probably (though not an easy choice, the go bindings look fancy too)

@vixalientoots @FineFindus @hbons Oh, this is super neat! I've been looking for smth like this for a while!

Out of curiosity, how does it differ from https://gtkx.dev/? 👀

GTKX

Linux application development for the modern age powered by GTK4 and React

@pojntfx @FineFindus @hbons Nice! Your input would be very valuable.

It differs from gtkx in that peachy builds on top of GJS while gtkx doesn't, and implements their own bindings. Peachy also uses the same react that's used to write web apps, while I think gtkx implements its own view engine