Comments (9)
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.
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.
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.
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.
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:
- repo: https://github.com/rynkowsg/fulcro3-yt-tutorial/
- branch:
230113-try-fulcro-rc4
from fulcro.
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.
Looks like I'm not quite done. Hot code reload force refresh isn't working right now :(
from fulcro.
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.
I think the issue this ticket was opened with originally is solved now. It probably can be closed now.
from fulcro.
I need to verify that my fix didn't break anything else, then I'll cut an official RC
from fulcro.
Related Issues (20)
- Unnecessary re-rendering HOT 3
- Denormalize should not "detect loop" for leaf entities HOT 2
- Associate a list of components with a different instance of a state machine each HOT 1
- Mutation params are "closed over" on mutation submission, which causes problem in result actions. HOT 9
- Warnings about missing initial state for anonymous components with a `:componentName` HOT 7
- `comp/get-query` not correct when using raw component and union query HOT 4
- Fix text area and table examples exploding width HOT 2
- Fulcro 3.6 w/React 18
- http error 404 on github-pages HOT 2
- http-remote :status-code is always 500 on error HOT 6
- Potentially add "Accept: application/transit+json" header. HOT 1
- Potentially omitted :force-root in `schedule-render!` HOT 5
- dr/change-route-relative! -- denied route does not call :route-denied component option HOT 1
- Dependency issue with taoensso.encore/dissoc-in HOT 2
- fs/dirty-fields misses recursive field HOT 1
- Link/ident queries don't work with `false` values
- dynamic routing question HOT 1
- HTTP middleware for making load/mutations work easily with JSON http APIs.
- Hook-based defsc should also have their parent set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fulcro.