Live data from Hacker News

Valdi – A cross-platform UI framework that delivers native performance

github.com

71–80 of 230 posts

Re: Valdi – A cross-platform UI framework that delivers native performance

#71

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

Then why bother making an app? The user can access the web app using the browser.

We (they) wanted "easy accessibility" and "constantly seeing this app's icon" bs.

Re: Valdi – A cross-platform UI framework that delivers native performance

#72
If you are curious how components' state is handled, they employed the React class components method:

  // Import the StatefulComponent
  import { StatefulComponent } from 'valdi_core/src/Component';
  
  // ViewModel + State interfaces for component
  export interface TimerViewModel { loop: number }
  interface TimerState { elapsed: number }
  
  // Component class
  export class Timer extends StatefulComponent {
    // Initialize the state
    state = { elapsed: 0 };
    // When creating the component, start a periodic logic
    private interval?: number;
  
    // Initialize the setInterval that will update state once a second incrementing
    // the `elapsed` state value.
    onCreate() {
      this.interval = setInterval(() => {
        // Increment the state to trigger a re-render periodically
        const elapsed = this.state.elapsed;
        const loop = this.viewModel.loop;
        this.setState({ elapsed: (elapsed + 1) % loop });
      }, 1000);
    }
  
    // When component is removed, make sure to cleanup interval logic
    onDestroy() {
      if (this.interval) clearInterval(this.interval);
    }
  
    // Render visuals will depend both on the state and the view model
    onRender() {
      
        ;
        ;
      ;
    }
  }
https://github.com/Snapchat/Valdi/blob/main/docs/docs/core-s...

Re: Valdi – A cross-platform UI framework that delivers native performance

#74
post #48

Earlier quoted context omitted.

I'm surprised Snap of all companies invested in a cross-platform UI framework given how simple their app seems in comparison to more complex ones out there. And more importantly, Snapchat seems like an app which could highly benefit from tight integration with native features (eg. camera, AR features, notifications, screenshot detection, etc.)

Perhaps for the same reason we got Airbnb of all companies to create Lottie. https://lottie.airbnb.tech/#/ These companies have super talented engineers and can afford to invest in skunkworks projects like these when they can’t find any suitable options in the market.

More like "super talented engineers" will keep increasing cost of such projects until they get told this stuff doesn't generate revenue/cost cutting is happening, so work more on ad tech, leave or find external free labor("community") to maintain it.

Re: Valdi – A cross-platform UI framework that delivers native performance

#75

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

You could just use Kotlin Multiplatform and Multiplatform Compose instead.

Re: Valdi – A cross-platform UI framework that delivers native performance

#76
post #3

> Valdi is a cross-platform UI framework that delivers native performance without sacrificing developer velocity. Write your UI once in declarative TypeScript, and it compiles directly to native views on iOS, Android, and macOS—no web views, no JavaScript bridges.

“We’ve got both kinds. Country and western!”

Favourite Blues Brothers quote!

Re: Valdi – A cross-platform UI framework that delivers native performance

#77
post #53

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

It’s a bad idea to put the fox (front-end developers) to guard the henhouse (great, consistent user experiences).

lol, yeah what do front ender devs know about UX. SMH…

Re: Valdi – A cross-platform UI framework that delivers native performance

#78

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

I recently downloaded the Moodle app and was surprised to find it's powered by Ionic and a webview, which I only realized due to CSS misconfigurations that caused the app to fall back to Serif font for CJK glyphs.

Recent mid-tier phones are powerful enough that webview has a negligible impact on performance.

Re: Valdi – A cross-platform UI framework that delivers native performance

#79

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

https://developer.android.com/develop/ui/views/layout/webapp...

Re: Valdi – A cross-platform UI framework that delivers native performance

#80

Working at a company that uses react-native I wish nothing more than for the end of app stores and differing platform languages. We're heavily considering just having a website next year with a mobile app using webview, and then native code for the native notifications, GPS and healthkit / health connect. I feel like AI is changing the equation, its nearly better to write your business UI 3 times one for each platfor…

Using apps made with Electron or those so-called "universal" UI frameworks I wish nothing more than for everything to be native.

They always have to give up some basic or hidden conveniences that native controls get for free, so they always feel slightly different and "off" in a weird way which induces a constant vague annoyance while using them, like walking with a little pebble in your shoe, or a sitting in an chair that isn't balanced right.

It's funny how even after 50 years UI still isn't "solved" ..before writing a universal API, we don't even have universal consensus, or at least some kind of standards authority, on how controls should behave.

Hell not even users can’t agree, as would be seen on any comments about this topic, on stuff like whether lists should scroll up when swiping down, or scroll down when swiping up :')

Post reply on HN