Show HN: Cami.js – A No Build, Web Component Based Reactive Framework

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • cami.js

    Cami.js is a simple yet powerful toolkit for interactive islands in web applications. No build step required.

  • Yes, the lib's great!

    Unfortunately I haven't thought much yet about interoperability with other web components libraries like lit. I imagined folks would choose just one web component library over the other.

    That said, you can initialize reactive properties(1), but property bindings won't work if there's a parent LitElement (as my reactive properties need to be called with either a .value method or an .update method for getting and setting respectively).

    As of the moment, what's possible is interop with other cami elements using a store, and in a future version, i'm considering a richer event system for external javascript code to listen to.

    ---

    (1) Initializing is possible with observerableAttr: https://github.com/kennyfrc/cami.js/blob/master/examples/008...

  • MobX

    Simple, scalable state management.

  • Looks good! FWIW I always felt the observable pattern much more intuitive than the redux/reducer style. Something like https://mobx.js.org/

    Things get hairy in both, but redux pattern feels so ridiculously ceremonially to effectively manage a huge global state object with a false sense of "purity".

    Observables otoh say "fuck it, I'm mutating everything, do what you want with it".

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Immer

    Create the next immutable state by mutating the current one

  • ```

    It looks like it’s mutating, but both the reducers and update() uses immer* under the hood, so we still respect immutability under the hood.

    Cami supports redux devtools so you can use that for time-travel debugging too!

    —-

    * https://github.com/immerjs/immer

  • Preact

    ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts