5 ms·
Here's a project I'm working on that uses react: https://edabit.com https://edabit.com
by Method-X 9y ago
Here's a project I'm working on that uses react: https://edabit.com https://edabit.com
- TekMol 9y agoThanks! Tried it a bit and thought: "Hmm.. it's probably react that causes all these spinning "loaders" everytime I click somewhere. Wouldn't it be better without?". How do you see that? EDIT: Ups, why the downvotes? With spinning "loaders" I mean the "loading" animation the website shows. The spinning circle. Anything bad about this question?
- JasonSage 9y ago> Anything bad about this question? You didn't ask a question, you jumped to a (wildly inaccurate) conclusion.
- TekMol 9y agoIn which sense inaccurate? If the server would just send a rendered page, why would a loading animation be needed?
- JasonSage 9y ago> it's probably react that causes all these spinning "loaders" everytime I click somewhere Statistically speaking it's _probably_ jQuery or pure JavaScript. These loading spinners have been around to make site loading more attractive for a long time, predating React, Vue, Ember, even Backbone. I have tons of clients on Wordpress that love this kind of thing even if all it does is make their site load without a flash of unstyled content (FOUC). > If the server would just send a rendered page React is primarily a client-side framework, but it's possible to render it on the server using Node. However, a lot of sites still use React to enhance an existing frontend, and therefore do not port their entire server to Node to render with React. > why would a loading animation be needed? Alright so lets assume you've server-rendered with React, do you still need a loading animation? Maybe. All these sites you click on that have loading spinners are all server-rendered pages too, but that doesn't stop people from throwing jQuery plugins at it to make their sites look fancy and prevent a FOUC. It's more a question of how many images the site wants to display above the fold. If there's a bunch of images, your site will not load fast and you can choose between letting users see a gappy page gradually get filled in or sit and look at a spinner for 1.5s. EDIT: not to mention all the advertising trackers these sites have enabled. This makes your image-loading all the more laggy.
- Method-X 9y agoThe loading spinners happen when data is being fetched from the database. The app itself is downloaded upon initial load and anything from the database will trigger a loading spinner as it's being fetched.
- TekMol 9y agoYup, I got that. But couldn't a bit of text be loaded instantly instead? Is the time the spinners run determined by the time the server needs to deliver the data? Would they go away when you put the site behind a CDN that delivers the data faster?
- chickenfries 9y ago> But couldn't a bit of text be loaded instantly instead? Yep. You could code your website in such a way to use a mix of serverside rendering and ajax components. This has always been true. Consider something like a server-rendered blog post that has a client-rendered Disqus widget. > Is the time the spinners run determined by the time the server needs to deliver the data? Basically. But you can also render your react app or vue on the server and then have client side rendering take over once the page is loaded. This is perhaps the ideal case but it's more complicated and takes some work to set up (I haven't actually done it).
- Hedja 9y agoJust thought I'd share my experience with this, since I had a similar problem. Spinners make it look like the app is taking ages to load data, even if it's not. If you delay showing the spinner until around a second of loading, it makes things feel a lot faster. The user doesn't need to always know when the app is loading data until there's a significant pause and they need to know stuff is happening.
- wehere1 9y agolol what kind of websites do you make? internationaloilandgas.com? drbronvillesfootcream.com?