panel
live_state
panel | live_state | |
---|---|---|
1 | 5 | |
272 | 161 | |
0.4% | 5.6% | |
5.7 | 6.9 | |
3 months ago | 26 days ago | |
JavaScript | HTML | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
panel
-
Web Components Will Outlive Your JavaScript Framework
Webcomponents will outlive React 13, mostly likely. Will they outlive React entirely or its cousins like Solid and Svelte? Perhaps not.
Webcomponents and React look like they solve the same problem but they do not.
Webcomponent api is pretty shallow. You get connected/disconnnected/attributeChanged call back but gotta write your own property setter and getters, and that’s mostly it. Shadow dom becomes a pain to work with if something needs to pierce it. Can’t pass nested objects in attributes, gotta encode as string.
Mixpanel went all in on webcomponents, but had to build a whole bunch of lib tooling around it. They made their own framework on top of webcomponents. https://github.com/mixpanel/panel
Worked on panel lib and webcomponent UI for many years. It is not a silver bullet.
The issue with webcomponents is there are a ton of libraries that fill in the missing gaps. There’s not a lot you can do with pure vanilla webcomponent api since browsers don’t provide efficient dom updating mechanism. Google has their own thing, Microsoft had multiple internal libs across orgs, Reddit does their own thing.
The most standard thing for frontend with wide adoption right now is React.
So the way I see it, is that React has already outlived webcomponents.
live_state
-
Web Components Will Outlive Your JavaScript Framework
Since you mention that state management is an unsolved problem with Web Components, I thought I would share a project that aims to bring a solution: https://github.com/launchscout/live_state. The basic pattern and idea of LiveState is "dispatch events, subscribe to state". The events and state updates are sent over a websocket connection, and the front end and back end libraries are a thin layer over Phoenix Channels. Currently, event handler functions are written in Elixir, but work is underway to allow them to be written in any language that compiles to WebAssembly.
-
Ask HN: Why isn't Phoenix/Elixir more mainstream?
We have switched to Elixir and Phoenix as our go to stack gradually over the last 5 years. We've found that LiveView in particular, with it's ability to avoid a separate front-end framework altogether, has let us deliver applications to clients in a significantly more productive way. We were a rails shop back in the day, and were able to build things very quickly. When the whole front-end framework thing got big, it slowed us down a lot because we were building two applications, essentially. Now that we are able to go fast again we (and our clients) are enjoying things a lot more.
I should also say that if you do need to use a separate front-end for whatever reason, I've built a thing called LiveState: https://github.com/launchscout/live_state that lets you keep things far simpler and gives a "LiveView like" experience.
-
What is the latest/greatest way to integrate React and Elixir?
Another option would be https://github.com/launchscout/live_state
-
Phoenix Dev Blog – Streams
Thank you, haven't seen this before. Similar to LiveState[0] also
[0] https://github.com/launchscout/live_state
-
Making a real-time interactive app, what is the best way to go about using Elixir as a standardized back-end for web and mobile?
I've been working on a thing to manage state via phoenix channels called live_state. The basic is idea is the front end code dispatches events which are sent up the channel, and receives state updates which are sent down the channel. The initial client I've done is js, and examples are for custom elements, but it should be fairly portable if it is of interest. I gave a talk on it at Elixirconf, video should be up eventually.
What are some alternatives?
lit-state - Simple shared component state management for LitElement.
kaffy - Powerfully simple admin package for phoenix applications
lit - Lit is a simple library for building fast, lightweight web components.
router - Small and powerful client-side router for Web Components. Framework-agnostic.
live_view_demos - Phoenix LiveView Demos 🚀
web-components-examples - A series of web components examples, related to the MDN web components documentation at https://developer.mozilla.org/en-US/docs/Web/Web_Components.
ts-liveview - Build hybrid SSG and SSR realtime SPA/MPA with Typescript
joystick - A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.
Phoenix - Peace of mind from prototype to production
uibuilder - Typed HTML templates using TypeScript's TSX files
pathex - Fastest tool to access data in Elixir