Live data from Hacker News

Ask HN: How does one build large front end apps without a framework like React?

news.ycombinator.com

181–190 of 197 posts

Re: Ask HN: How does one build large front end apps without a framework like React?

#181

Earlier quoted context omitted.

You come across as an asshole for professing this opinion “everyone else is autistic or dumb”, and also wrong. I would never want to work with you on a team; you seem like the type to flaunt existing best practices at any opportunity.

First of all I said people who claim to be programmers and cannot write original code are either autistic or low intelligence. The emphasis there is on original code . Secondly, I know something about autism, because I have a child with autism. Look at the comments in this thread. A guy asked a question about vanilla JavaScript, a completely valid question on a site about comments upon programming links, and yet noti…

the only thing I could read from your posts is low social intelligence and fragile ego.

Re: Ask HN: How does one build large front end apps without a framework like React?

#182

Earlier quoted context omitted.

When I want to memoize something slightly complex, for simplicity's sake let's say sorting an array of objects based on one of it's keys. I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason. Usually that array is mapped elsewhere and those child components might also re render if the array is recalculated. useEffects are when I need to call something outside of re…

> I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason useMemo dependency smell. This is almost always because your dependencies are wrong. This can often happen if you put a dependency as [object] instead of [object.field] due to how JavaScript maps objects to memory.

useMemo is quite nice when you're doing data transformation against some API call or other big data structure.

Re: Ask HN: How does one build large front end apps without a framework like React?

#183

The frontend of my main OSS work was made is plain es6: https://github.com/mickael-kerjean/filestash The frameworky code is under 100 lines of code, heavily inspired by what I think is a good idea from React: "components are pure function", the simplest example of the about page beeing visible here: https://github.com/mickael-kerjean/filestash/blob/master/pub... Since the whole project was migrated over from React, I…

> es6 is ready for prime time

I hope this becomes common knowledge! There was a period somewhere between when the web platform didn't have good tools to make web applications (plus DOM manipulation was slow) and the mainstream adoption of es2015 in browsers when it made sense to do things like create a virtual DOM to allow for unavailable features at the expense of performance. It did have its place, but we don't need it anymore.

Remove a layer. In 2025 ES6 is ready for prime time, indeed.

Re: Ask HN: How does one build large front end apps without a framework like React?

#184

Earlier 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.

I learned React before hooks. Came from a mostly forgotten framework called ExtJS that used base JavaScript classes, so it was an easy transition.

Class based React is great. My old projects are cleanly structured, but harder to change. Class based React also lacks the composability you get with hooks.

Re: Ask HN: How does one build large front end apps without a framework like React?

#185

Earlier quoted context omitted.

> I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason useMemo dependency smell. This is almost always because your dependencies are wrong. This can often happen if you put a dependency as [object] instead of [object.field] due to how JavaScript maps objects to memory.

useMemo is quite nice when you're doing data transformation against some API call or other big data structure.

Yes, it is, but you still have to declare your dependencies correctly.

Re: Ask HN: How does one build large front end apps without a framework like React?

#187

> JS frameworks move really quickly React is a lot more stable than I think you're giving it credit for. > And the stability also means that more time is spent on delivering features Frameworks/libs also exist to save you time, thus letting you spend more time on delivering features. And fwiw, the obsidian team seems to agree in principle. Your link goes to a forum post of some kind, in which one may find a link to o…

> React is a lot more stable than I think you're giving it credit for.

I'm glad they take good care of backwards compatibility. React was the most common example, I didn't intend to target it specifically.

Not all frameworks are like this though. Svelte 5 introduced many breaking changes, with plans to deprecate the classic Svelte 4 syntax. So that forces many projects to spend time migrating to the newer version.

> The idea that not using a frontend framework will let you focus on delivering features seems reductive...

Agreed, appreciate the healthy arguments. :)

Re: Ask HN: How does one build large front end apps without a framework like React?

#188

> JS frameworks move really quickly React is a lot more stable than I think you're giving it credit for. > And the stability also means that more time is spent on delivering features Frameworks/libs also exist to save you time, thus letting you spend more time on delivering features. And fwiw, the obsidian team seems to agree in principle. Your link goes to a forum post of some kind, in which one may find a link to o…

[flagged]

Re: Ask HN: How does one build large front end apps without a framework like React?

#189

Earlier quoted context omitted.

When I want to memoize something slightly complex, for simplicity's sake let's say sorting an array of objects based on one of it's keys. I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason. Usually that array is mapped elsewhere and those child components might also re render if the array is recalculated. useEffects are when I need to call something outside of re…

> I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason useMemo dependency smell. This is almost always because your dependencies are wrong. This can often happen if you put a dependency as [object] instead of [object.field] due to how JavaScript maps objects to memory.

Never thought of it that way. What if it's an array though, how will I put it as a dependency?

Re: Ask HN: How does one build large front end apps without a framework like React?

#190

Earlier quoted context omitted.

er... no. html+css is view, js is model and controller. Maybe, if by html we are saying html+dom+webAPIs (indexeddb, localstorage, sessionstorage, cache API), then yeah, you'd be right.

huh I guess abstractions can lead to a break in consensus. You sound as confident as I feel on the matter but we're at different places. Maybe that's all that "good design" is ... surely there's other systems and architectures where we can confidently reach the same conclusion independently. For instance, here, I thought we have a well-done separation of concerns that is a bit exotic and people refuse to understand i…

That's right, MVC is a very simplified model that's actually quite useless in practice. The reality, is as you have reflected, is messy with cross-cutting concerns, and it's often the case that it's not easy or obvious where the lines are drawn.
Post reply on HN