This is what I used for fontofweb.com's snipper chrome extension.
Ask HN: How does one build large front end apps without a framework like React?
31–40 of 197 posts
Re: Ask HN: How does one build large front end apps without a framework like React?
#32Vanilla JS is very powerful and has the features you need to build SPAs without a big framework. Proxies and mutation observers are great for maintaining state, Updating the DOM yourself is fine, view transitions are awesome, etc. The only thing that's hard is routing, but there are lots of small dedicated JS libraries to handle that. Here's one I made that gives you the Express API on the frontend: https://github.co…
Re: Ask HN: How does one build large front end apps without a framework like React?
#33The reasons I avoid large frameworks like React, Angular, Vue, and even jQuery is that they are aren't necessary. They are code decoration that slows things down. Here is what you can expect without these: * greater flexibility * faster execution, My current application produces a large single page application that fully renders visually and executes state restoration in about 105ms localhost or under 200ms across a…
If you want to ship an MVP next week and you spend 6 days setting up your env, you've already failed. If you can get a framework with at least 80% of the features you need, suddenly you have 6.5 days left to build the product
Re: Ask HN: How does one build large front end apps without a framework like React?
#34My priority is code clarity … so while it is not yet tested at scale, https://harcstack.org is aimed to do this on the server side (disclosure - I am the author)
Another determinant is the server side language / approach to templating you choose. With HTMX Python, Rust, Go are all fair game. I’m leading with Raku due to its web framework and ORM.
Re: Ask HN: How does one build large front end apps without a framework like React?
#35MDN has your answer, built into the browser, ready to go: https://developer.mozilla.org/docs/Web/API/Web_components If that's not enough, Lit enhances it a bit such that either LitElement and/or litHtml can accommodate whichever style you want: https://lit.dev/
Re: Ask HN: How does one build large front end apps without a framework like React?
#362. router https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern...
The rest should be code organization, not even a build tool.
Can check this example https://github.com/radio4000/components
Re: Ask HN: How does one build large front end apps without a framework like React?
#37I think that you have a good angle, with latest HTML, CSS and so on. I would consider HTMX or DataStar (SSE) based on where you want to manage the state. Bear in mind that both can coexist. My priority is code clarity … so while it is not yet tested at scale, https://harcstack.org is aimed to do this on the server side (disclosure - I am the author) Another determinant is the server side language / approach to templa…
Re: Ask HN: How does one build large front end apps without a framework like React?
#38Earlier quoted context omitted.
> React is a lot more stable than I think you're giving it credit for. A lot of the HN zeitgegist would have you believe React is the opposite, sadly.
The React ecosystem moves really quickly, and likes to re-invent wheels. But React core APIs remain relatively stable, I've been using React the same way for many years at this point, and you can ignore the parts you don't like, like I'm ignoring hooks and haven't found a single use case where I needed them.
Re: Ask HN: How does one build large front end apps without a framework like React?
#39Earlier quoted context omitted.
The React ecosystem moves really quickly, and likes to re-invent wheels. But React core APIs remain relatively stable, I've been using React the same way for many years at this point, and you can ignore the parts you don't like, like I'm ignoring hooks and haven't found a single use case where I needed them.
Could you please tell me how are you avoiding hooks? You're not using useState or useEffects?
Turning it around, what exactly are you unable to do without useState/useEffects?
Re: Ask HN: How does one build large front end apps without a framework like React?
#401. web-components https://developer.mozilla.org/en-US/docs/Web/API/Web_compone... 2. router https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern... The rest should be code organization, not even a build tool. Can check this example https://github.com/radio4000/components
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
You basically have the same capability you have in python or other ecosystems if you can be bothered to attempt what the OP suggests. Determining an appropriate way to organize your code is actually a really hard problem to solve if you've been leaning on 3rd parties to solve it for you. It's definitely a skill worth developing. Once you have it you will begin to dislike the organizational suggestions of others because they'll never fit your problem as well as a hand tuned strategy.