Giter VIP home page Giter VIP logo

Comments (9)

awkay avatar awkay commented on August 16, 2024

Ah, there is a rendering optimization in 3.6 that is causing this behavior, but I may have done it wrong. The old system always checked props on root in shouldComponentUpdate, which is a huge waste of CPU particularly for deep and wide trees, since you'll spend more time on the compare than the render in most cases. So I made the default skip the check on root. The side-branches, however, should still have their SCU in tact, and should short-circuit. I'll have a look. Thanks for pointing it out.

from fulcro.

awkay avatar awkay commented on August 16, 2024

Argh...Yeah, this is broken. Very sad. The SCU function is fine. I had to switch to using React context to pass various things down the tree (was using dyn vars but async render nixed that)...unfortunately when the context changes, the components all re-render and SCU is ignored (though still called, annoyingly enough).

I'll have to hack some more and see what I can figure out.

from fulcro.

awkay avatar awkay commented on August 16, 2024

I think this is fixed in 3.6.0-RC4-SNAPSHOT (sha 63f32e4). I need to test it more widely, but it fixes your example. Thanks for the report.

from fulcro.

rynkowsg avatar rynkowsg commented on August 16, 2024

I'm happy to help.

I ran it again with React 18 and 3.6.0-RC4-SNAPSHOT, and this time it fails to mount the APP.
I also tested it with given refs (both 63f32e4 & aabd3ca) and it behaves the same way as the snapshot.

Screenshot 2023-01-13 at 11 07 07

The only changes I introduced this time (f496009, 03586d4, fb530d3) were an update of React to 18 & upgrade to newer Fulcro versions.

The reproducible setup is available here:

from fulcro.

awkay avatar awkay commented on August 16, 2024

Pushed a new snapshot. It totally works with my setup, so I'm confused, but I change a macro and that seems to ahve cleared it up.

SHA e06309b.

There is still one more thing to clean up, but that should behave better.

from fulcro.

awkay avatar awkay commented on August 16, 2024

Looks like I'm not quite done. Hot code reload force refresh isn't working right now :(

from fulcro.

rynkowsg avatar rynkowsg commented on August 16, 2024

Is "Hot code reload force refresh" something different from "Hot code reload" (the refresh of the app on saving the file without losing the app state)?

I tested fulcro SHA 2b96c84 and it works fine, including hot code reload - (fulcro3-yt-tutorial in 4979e5c) .

from fulcro.

rynkowsg avatar rynkowsg commented on August 16, 2024

I think the issue this ticket was opened with originally is solved now. It probably can be closed now.

from fulcro.

awkay avatar awkay commented on August 16, 2024

I need to verify that my fix didn't break anything else, then I'll cut an official RC

from fulcro.

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.