News for hackers. Stuff that matters.
Re:Rebuilding our tech stack for the new facebook.com by edhelas on Friday May 08, 2020 @01:05PM (#23116970)
In France we have a Craiglist-like website. They recently moved to ReactJS : https://www.leboncoin.fr/

The website features didn't changed in between. It's basically a pagination + a search based on radius (so DB related) + name (so DB related) + categories (so DB related).

The complete website could be build in pure HTML + CSS and a bit of JS + Ajax to refresh parts of it.

But no, it's build with ReactJS, and it takes seconds to search a simple item on it.

To compare, just try the same search on the Dutch equivalent, MarktPlaats, https://www.marktplaats.nl/. The experience is way snappier, way lighter, the features are the same, and it's just HTML + CSS + a bit of JS.

We made a mistake with React/Vue/Angular. And we should really go back and stop using those frameworks.

Re:Rebuilding our tech stack for the new facebook.com by pier25 on Friday May 08, 2020 @01:26PM (#23117213)
> And we should really go back and stop using those frameworks

I think you are cherry picking.

There are plenty of examples in the modern web of terrible React/etc implementations but that doesn't mean the approach in itself is bad.

Re:Rebuilding our tech stack for the new facebook.com by kolanos on Friday May 08, 2020 @03:16PM (#23118362)
> There are plenty of examples in the modern web of terrible React/etc implementations but that doesn't mean the approach in itself is bad.

If the creators of React can't get it right, then what hope is there?

Re:Rebuilding our tech stack for the new facebook.com by pier25 on Friday May 08, 2020 @04:01PM (#23118833)
React is bloated and slow, but there are dozens of frameworks other than React.

https://krausest.github.io/js-framework-benchmark/current.ht...

Re:Rebuilding our tech stack for the new facebook.com by deanCommie on Friday May 08, 2020 @02:13PM (#23117727)
Please name some.
Re:Rebuilding our tech stack for the new facebook.com by pier25 on Friday May 08, 2020 @04:02PM (#23118836)
Some good React alternatives?
Re:Rebuilding our tech stack for the new facebook.com by mhoad on Friday May 08, 2020 @06:35PM (#23120296)
I’ve been plying around with lit-element lately and am finding it a much simpler experience overall. Likely a lot faster as well https://youtu.be/uCHZJy2n8Qs
Re:Rebuilding our tech stack for the new facebook.com by pier25 on Friday May 08, 2020 @07:44PM (#23120752)
Lit is excellent.

It's also possible to use htm with Preact for developing without a bundler if your target users support ES6.

https://github.com/developit/htm

Re:Rebuilding our tech stack for the new facebook.com by goatlover on Friday May 08, 2020 @03:22PM (#23118421)
What's the reason for redoing a website that provides the same functionality? Why use an SPA for basic website features?
Re:Rebuilding our tech stack for the new facebook.com by neop1x on Sunday May 10, 2020 @05:43AM (#23131412)
They made the same with local Czech eBay-like website https://www.aukro.cz/ . Previously it was a fast website. Transition to the webapp was painful, their filtering component was not working properly on mobile. It still takes several seconds until the initial white page switches to the rendered DOM. They lost many customers due to this painful transition. I think they fixed some of the problems (I know filtering component works ok now) but I basically stopped using it since that transition too.
Re:Rebuilding our tech stack for the new facebook.com by fbnlsr on Friday May 08, 2020 @02:40PM (#23118002)
Thank you for this post. I yell at my screen each time I have to use leboncoin.

It was super ugly, but it did the job. Now it's super ugly, but it steals my focus at every opportunity, refreshes parts of the UI I'm about to click, or has select inputs that love to play hide and seek with my cursor. It's a UX nightmare.

I must say their new payment system is nice. But boy do we have to suffer when looking for something to buy now.

Re:Rebuilding our tech stack for the new facebook.com by julosflb on Friday May 08, 2020 @01:15PM (#23117081)
Could not agree more. It is barely usable now. The exact opposite of the original spirit. A complete failure.
Re:Rebuilding our tech stack for the new facebook.com by girishso on Friday May 08, 2020 @01:13PM (#23117050)
Agreed. SPAs only make sense for few websites like Trello, for most other websites plain dynamic HTML with dash of ajax here and there are much better.
Re:Rebuilding our tech stack for the new facebook.com by pier25 on Friday May 08, 2020 @01:27PM (#23117224)
You know it's possible to use any of the modern JS frameworks without SPA, right?
Re:Rebuilding our tech stack for the new facebook.com by amedvednikov on Friday May 08, 2020 @01:36PM (#23117342)
It has 96 .js scripts on a single page.
Re:Rebuilding our tech stack for the new facebook.com by pyronite on Friday May 08, 2020 @01:55PM (#23117547)
This used to be a bigger deal before HTTP/2 increased the number of concurrent requests to be virtually unlimited.

Unless I'm missing something, it's "optimal" for a site to have many split files. If their JavaScript were 1 file, a change to a single character would mean the need to re-download every bit of JavaScript. Instead, with 96 files, it would mean 95 of them are still cached client-side and only 1 is need of downloading.

Re:Rebuilding our tech stack for the new facebook.com by thomaslord on Friday May 08, 2020 @03:10PM (#23118300)
It looks to me like these scripts are asynchronously-loaded components that load only once they're needed. In this case it looks suspiciously like they're nested and each script download causes another script to be downloaded once the component renders, which would make HTTP/2 a moot point. I can even watch the requests pile up in the dev tools when they're cached, so my guess is if they dumped everything in one file (or even 10 files, just not 95) they'd get noticeably improved performance.