Live data from Hacker News

Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

github.com

51–60 of 74 posts

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#52

It's great people experiment. Yet, after a quick glance the framework seems to break expected semantics for no gain? For example: the "component" construct auto-renders the JSX within the brackets instead of being a function that "returns a view as value" (if I understood correctly). I'm cool with breaking the "f(x)=>UI" but what for? The TS and VS Code integration is all fine and good but what's the gain of using JS…

HTML is an implementation detail and JSX is a syntax for describing UI components. For example JSX can be reused across different contexts such as for React Mobile. It just so happens most usage of JSX is used to render HTML so it superficially appears to be writing HTML syntax. But I prefer JSX because it allows me to write UI HTML components as pure functions, without having to syntactically write out actual functions in whatever programming language I'm using.

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#53
What's the benefit of this, over just using proxies [1][2] to manage state? You then get to mutate objects however you want without having to use templating.

    const state = proxy({
      dur: 1,
      count: 141
    });
    const incDur = () => {++state.dur};
    const decDur = () => {--state.dur};
    const incCount = () => {
      ++state.count;
      setTimeout(incCount, 100 \* state.dur);
    };
    return (
      {state.count}, {state.dur}
    );
Is it specifically proxies only work on objects, and in this approach you can have direct variables?

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2] https://valtio.dev

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#54

I feel like these functional GUI renderers are all trying to make JS something it is simply not. I want to render my view with instances of classes as a model.

Please keep OO away from web dev. The mess is bad enough and adding OO will only increase coupling.

Calling OO to increase coupling is a weird take in a world where React's "functional components" and similar patterns encapsulate their state and rendering pipeline.

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#55

It's great people experiment. Yet, after a quick glance the framework seems to break expected semantics for no gain? For example: the "component" construct auto-renders the JSX within the brackets instead of being a function that "returns a view as value" (if I understood correctly). I'm cool with breaking the "f(x)=>UI" but what for? The TS and VS Code integration is all fine and good but what's the gain of using JS…

HTML is an implementation detail and JSX is a syntax for describing UI components. For example JSX can be reused across different contexts such as for React Mobile. It just so happens most usage of JSX is used to render HTML so it superficially appears to be writing HTML syntax. But I prefer JSX because it allows me to write UI HTML components as pure functions, without having to syntactically write out actual functi…

Fair enough. IMO the best solution is/was always hiccup (cljs) since it has no extra syntax to the core of the language (vectors/maps)

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#57

It's great people experiment. Yet, after a quick glance the framework seems to break expected semantics for no gain? For example: the "component" construct auto-renders the JSX within the brackets instead of being a function that "returns a view as value" (if I understood correctly). I'm cool with breaking the "f(x)=>UI" but what for? The TS and VS Code integration is all fine and good but what's the gain of using JS…

I love JSX and hate HTML template syntax, so there's at least one person. What I like about JSX is that you can reuse all of the control flow primitives from JS. You have if, for, map, filter, flatMap, etc. if you want a new combinator, just write a function as you would for any other type of data transformation. I consider this one of the biggest advantages of React compared to the approach of having separate templa…

For me it is the opposite. I dislike having imperative constructs pollute my otherwise declarative markup. To each their own I guess.

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#58

You need to drop your source code into some LLMs and ask for a security review - there's lots of holes.

Oh yes, because LLMs are known for good security practices.

I did not want to embarrass the author but the LLM showed that this library is absolutely full of major security holes.

And yes, it's an LLM that pointed them out.

So, are you saying the security holes don't exist because an LLM found them?

Re: Ripple – A TypeScript UI framework that takes the best of React, Solid, Svelte

#59
This shares a lot of similarities to what I’m doing with new version of Semantic UI.

Components - https://next.semantic-ui.com/components

Templating - https://next.semantic-ui.com/templates

Signals - https://next.semantic-ui.com/reactivity

DOM - https://next.semantic-ui.com/query

API Refs - https://next.semantic-ui.com/api

Post reply on HN