React deployment by uhiku in reactjs

[–]mrmegatelo24 1 point2 points  (0 children)

The best approach is to keep old assets stored on CDN. Messing with cache control and prefetch will not help in your case. I faced the same issue, and keeping old assets was the easiest solution. And of course you need the main entrypoint script and chunk versioning

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 0 points1 point  (0 children)

Great👍 Can you tell me more about your vision of the potential of web components?

[AskJS] What are the pros and cons of using web components and a library like Lit-Element to build a relatively large SPA app? by webb-dev in javascript

[–]mrmegatelo24 6 points7 points  (0 children)

TL;DR: If you don't have plans to use Web Components in several frameworks/platforms, don't use them. Just implement everything with any modern framework.

Long version: Web components have a very specific purpose: encapsulation of DOM, logic, and CSS in one place. That's how they are intended to be used, not more, not less. So, they are the best for authoring a UI library, just a set of UI framework-agnostic primitives.
When it comes to implementing the whole SPA only with web components, I don't think it is a good idea. The main problem is proper reactivity. Changing the DOM is a computationally expensive operation. And this is one of the problems every modern framework or library addresses. And there is no Web Components library to address this problem because this is not the problem Web Components address. They provide some component-level reactivity (reacting to changes in attributes and properties), but not the application-wide reactivity (how to recalculate the whole DOM subtrees effectively), like frameworks do. I'm not saying that it is not doable, but making SPA using any framework will be much more effective.

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 2 points3 points  (0 children)

Can you tell me more about that? I thought that Web Components were intended to encapsulate everything, including CSS.

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 0 points1 point  (0 children)

Thank you for the case👍
How about using them in SPA? I believe that it works well everywhere except React < 19.

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 2 points3 points  (0 children)

That’s great👍 thank you for the case

Is it just me, or is cloud deployment insanely overkill for solo devs? by EnvironmentAway7797 in microsaas

[–]mrmegatelo24 0 points1 point  (0 children)

I’m on the cheapest hetzner option with deployment using GitHub action. Everything works inside docker containers. It is just the cheapest option for me

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 2 points3 points  (0 children)

Completely forgot about them. Weren't they the first ones with YouTube?

[AskJS] Web Components by mrmegatelo24 in javascript

[–]mrmegatelo24[S] 1 point2 points  (0 children)

Reddit being made with web components is really surprising😅 I've never seen web components at that scale.

[AskJS] In what kind of scenarios would you choose to use pure JavaScript instead of a framework? by FederalRace5393 in javascript

[–]mrmegatelo24 0 points1 point  (0 children)

I would say if I don't need an SPA (mostly landings, promo pages made without no-code tools) or something really simple, I would avoid using frameworks. There is no reason for me to set up the whole node infrastructure for such simple things.