preact-custom-element
eureka
preact-custom-element | eureka | |
---|---|---|
2 | 11 | |
343 | 4 | |
0.9% | - | |
6.1 | 1.8 | |
7 months ago | over 3 years ago | |
JavaScript | ||
MIT License | GNU General Public License v3.0 only |
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.
preact-custom-element
-
I don't miss React: a story about using the platform
I avoid using them, except when having to expose a component to a third party. Then I'd use something like https://github.com/preactjs/preact-custom-element, https://stenciljs.com/docs/custom-elements or https://github.com/solidjs/solid/tree/main/packages/solid-el....
As far as I see, there is nothing that WCs provide which isn't already solved, in a better way, both for devs and users.
And making a framework that use custom elements and shadow DOM for component-based logic and encapsulation seems like a purely philosophical approach to adhere to some vision of "platform purity".
-
Web Components 101: Framework Comparison
Preact
eureka
-
How to build a website without frameworks and tons of libraries
Here's an example of building a well-structured, maintainable web-site using JavaScript, HTML and CSS: https://github.com/wisercoder/eureka/tree/master/webapp/Clie...
It doesn't use React (imagine the horror!), instead it uses two tine 500-line libs.
-
React is 10 years old
> a literal 5-20x productivity boost
Not really. See a better way here: https://github.com/wisercoder/eureka
- Building a Front End Framework; Reactivity, Composability with No Dependencies
-
React is a fractal of bad design
I'm not quite seeing React being used, just JSX though? All the view and state updating is being done manually, but it looks fairly well-organised. There are small optimisations like debouncing onInput with a timeout (avoiding rapid re-rendering for every character typed): https://github.com/wisercoder/eureka/blob/master/webapp/Clie...
- Ask HN: Good resource on writing web app with plain JavaScript/HTML/CSS
- Can We All Just Admit React Hooks Were a Bad Idea?
- Ask HN: What happened to vanilla HTML/CSS/JS development?
-
I don't miss React: a story about using the platform
React works well for simple, non-interactive components. Complex, interactive components are going to have state. Stateful components don't work so well in React. If you want to update props in a stateful component, the recommendation is to replace the component entirely by changing its key. At the point all of the benefits of React (preservation of selection, caret position, scroll position etc.) vanish. You might as well use vanilla js instead of React.
What does using Vanilla JS look like? Here's an example: https://github.com/wisercoder/eureka It uses two tiny 500-line libs. It uses TSX files, just like React. It has components, just like React. It doesn't have incremental screen update, but neither does React, if your components are interactive and stateful.
- A Visual Guide to React Rendering
What are some alternatives?
dark-mode-toggle - A custom element that allows you to easily put a Dark Mode 🌒 toggle or switch on your site:
webcomponents - Web Components specifications
lit - Lit is a simple library for building fast, lightweight web components.
Ink - 🌈 React for interactive command-line apps
solid - A declarative, efficient, and flexible JavaScript library for building user interfaces.
org-mode-site-template - A workflow for a complete site using the HTML publish option of Emacs Org-Mode
DataFormsJS - 🌟 DataFormsJS 🌟 A minimal JavaScript Framework, standalone React and Web Components, and JSX Compiler for rapid development of high quality websites and single page applications.
el - Minimal JavaScript application framework / WebComponents base class
uhtml - A micro HTML/SVG render
editable-website - A SvelteKit template for building CMS-free editable websites
visx - 🐯 visx | visualization components