Code Monkey home page Code Monkey logo

Comments (11)

delata avatar delata commented on May 22, 2024 5

i don't know, they were simple website. the whole react thing is a garbage. worse thing is that people are now using it every where.

from tailblocks.

 avatar commented on May 22, 2024 2

@delata It seems to be instantaneous for me on the latest versions of Chrome, Firefox, and Safari on MacOS. Would you mind showing a video?

from tailblocks.

delata avatar delata commented on May 22, 2024

i am using chrome ( actually Brave) on android running on a 3 years old 75 dollar phone.

from tailblocks.

delata avatar delata commented on May 22, 2024

again you are running on a macbook.
yes on my laptop lag is less noticeable.
test this on a low powered phone.

from tailblocks.

Anachron avatar Anachron commented on May 22, 2024

I'm running it on a Samsung Galaxy A40 which costes $150 when it was new a year ago but it takes at most a second to change.

Are you sure it is not causes by addons or other applications slowing down your phone?

Also I'm running it on firefox, maybe try that as well.

from tailblocks.

delata avatar delata commented on May 22, 2024

this is a problem, i have used other websites that had this kind of mechanism, but they were smooth on my phone.

from tailblocks.

Anachron avatar Anachron commented on May 22, 2024

Were they also written in react or just switched stylesheets?

from tailblocks.

 avatar commented on May 22, 2024

@delata I see what you're talking about: 6x Slowed CPU + 3G, but I believe this is just the result of making large changes to the DOM on slower devices, which is why you don't notice it on other websites. I think a solution could be to maybe make the opposite version (dark/light) hidden instead of completely removed from the DOM; however, this feels like an edge case.

from tailblocks.

 avatar commented on May 22, 2024

Were they also written in react or just switched stylesheets?

They're two separate React components which are removed and added with the switch, which causes quite a bit of distress to the CPU, etc.. Only around ten CSS classes are changed, so I can see possible merging these two components into one, but it will reduce readability of the source code.

from tailblocks.

Anachron avatar Anachron commented on May 22, 2024

Were they also written in react or just switched stylesheets?

They're two separate React components which are removed and added with the switch, which causes quite a bit of distress to the CPU, etc.. Only around ten CSS classes are changed, so I can see possible merging these two components into one, but it will reduce readability of the source code.

I was talking about the other websites, if they were switching stylesheets or also are written in react. I am well aware how this library handles it, given that I've read the source code.

from tailblocks.

 avatar commented on May 22, 2024

@Anachron Sorry, I guess I misread it.

from tailblocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.