This is not reinvention of PHP as some are commenting. In fact I think this is extremely cool.

If I understand it correctly, it allows you to achieve reactive data flow in a single page app without any boilerplate.

Meaning - you update the database on the server and all the relevant UI(s) will automatically receive the updated data and re-render only the parts of the UI that display that data.

This would require a ton of PHP and Javascript dealing with networking, websockets, routing, serializing data and so on.

Haven't tried it yet, but very curious to see if it works.

The problem with this type of system in my experience is that it’s great until you hit a bug, and then you realize you have no idea what’s going on under all the automagical stuff and you go crazy

How is this different from any other framework? Try fixing a React or Rails bug.

At least their system is only 2k LOC, which will presumably be well documented.

At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library. Rails is a closer comparison, especially with whatever their live-view implementation is. This appears to be doing a lot more than React, at least, including network communication, and database change event propagation. The odds seem much higher that stuff will go wrong, especially under load, and be pretty difficult to reason about.

> At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library.

Their implementation is 2k lines of code. The React repo has 350k lines of code. The Rails repo has 336k lines of code (both of those according to tokei). Of course this includes tests, lots of other stuff, etc. But still, that's two orders of magnitude.

preact is much simpler than react (~3KB), and whats weird, it's also faster

BTW: code is very easy to read/follow https://github.com/preactjs/preact/