logoalt Hacker News

Octane – React’s programming model, compiled

115 pointsby nnxtoday at 8:04 AM40 commentsview on HN

Comments

rco8786today at 11:15 AM

> Measured, not vibes

Sort of ironic considering that there are a LOT of vibe tells in the copy throughout this page. It's a neat looking project, it's a shame that every other sentence has Claude's fingerprints all over it.

show 1 reply
ricardobeattoday at 2:33 PM

Would look more appealing without the AI flavour. If you're vibe coding, do yourself a favor and write website copy yourself - it's the only evidence of human input or oversight your project will have.

show 2 replies
Guillaume86today at 1:29 PM

Just took a glance so I may be completely wrong, fell free to ignore, but if I understand correctly, tsrx is just syntactic sugar for normal tsx code and does not enable anything new?

If this is the case: I think introducing tsrx as part of Octane muddies the water a bit and makes me more hesitant to try (even if it is optional).

The idea to make tsx files more readable may be interesting but in that case it should go into its own separate project, and maybe just put a lang toggle in Octane docs and a page about tsrx compat, that way if people are intrigued by the new syntax they can just look it up but the docs stay focused.

show 1 reply
vivzkestreltoday at 3:18 PM

- please post 10 new frontend frameworks daily to HN

- i ll take that over the AI, GPT, LLM, Agent stuff on HN anyday now

aatd86today at 9:21 AM

I recognize this comparison style. Definitely generated by Claude. haha

adzmtoday at 3:18 PM

An interesting feature is this:

> A current-state getter. useState and useReducer return [state, update, getState], so a delayed callback can read the latest value instead of a stale capture.

There are currently a few workarounds in React for this, and using other state management libs also give you non-reactive access to current state, but this is a big help in certain situations.

For example, a callback / event that you pass to all your child elements, that needs to access the current state when run, therefore normally needs to be recreated with the new state captured (in useCallback) whenever state changes, which then causes all child components to re-render. Non-reactive access to current state in callbacks avoids this entirely.

There are some hacks that fix this by wrapping the updated callback in a ref and updating it with an event (for example, https://usehooks-ts.com/react-hook/use-event-callback useEventCallback as implemented various places) and returning a stable reference to a function that calls that saved one, though I always wonder if there are downsides to this.

exceptionetoday at 4:59 PM

The copy reads like it is react but improved. Which begs some questions: what strings are attached and why wouldn't the authors of react adopt this? What reasons would developers have to not switch from react to octane?

show 1 reply
hellohello2today at 5:38 PM

Looks interesting. But does anyone really like the useState useContext etc. React model? Might as well make a better one if you are going to be compiling no?

xpltoday at 12:02 PM

Does it have any overlaps with React Compiler — like the auto-memoization that they have?

Also, is there any read on the downsides / shortcomings / caveats of Octane vs. vanilla React?

show 1 reply
mapcarstoday at 10:07 AM

It seems like an attempt to port Svelte's features to React-like api?

xpltoday at 11:03 AM

The model is a bit different from React (no deps, hooks can be under ifs) — do coding agents recognize it or they get confused when they see that code?

show 1 reply
ksectoday at 1:08 PM

I think the Github link [1] does a much better job at explaining what it is.

[1] https://github.com/octanejs/octane

ARusselltoday at 3:11 PM

It would be nice to see how this differs from SolidJS.

adithyassekhartoday at 9:34 AM

It took a while to render when I clicked the Differences from React button on an iphone 17.

show 1 reply
Tajnymagtoday at 9:12 AM

I'm surprised how good Vue Vapor mode is from the performance comparison table.

show 1 reply
torment-nexustoday at 12:57 PM

This is an interesting problem. A similar approach that worked for us was to only load the tools the agent actually needs for each task.

efficaxtoday at 2:01 PM

This looks like an interesting project but reading these AI slop web pages is so exhausting. At least turn your brain on long enough to explain what your project does

epolanskitoday at 10:37 AM

Interested in experimenting with Octane, wish that docs emphasized more the SSR aspect of it, because I'm looking for a Ruby/Phoenix/Php alternative in TypeScript land, and one with React-like apis would be cool.

show 2 replies
projektfutoday at 4:39 PM

[dead]

KoleSeise1277today at 11:23 AM

[dead]

cpt100today at 1:53 PM

Why are people still building these frameworks? Can't we just use LLMs to build the best JS framework?

show 1 reply