Comments (5)
Another observation: aren't debounce
and sched/schedule-animation!
overlapping functionality. At the first glance sched/schedule-animation!
looks like throttle-first with a global state.
(debounce (throttle-first (fn [] ...) 16) 16)
Since the debounce encapsules sched/schedule-animation!, the latter is not going to do anything, unless sched/schedule-animation! with that particular action is also used somewhere else.
from fulcro.
Your problem report is not clear to me. Are you observing a condition where the UI is incorrect? Or are you reporting that you don't like it that render might be called more than you like?
from fulcro.
This issue is not about double rendering (which was initial reason for my investigation) but about shared props not being recalculated under certain conditions.
Please have a look at issue desc under section titled Problem with schedule-render!. I haven't try to reproduce it, but by reading the code, it looks that calling (schedule-render! app {:force-root? true})
is not guaranteed to honor :force-root? true, meaning when we request force shared props to be recalculated via schedule-render!, under certain conditions they might not get recalculated.
It is not my problem, but if I'm correct, it is a source of occasional issues related to shared props.
I don't have certainty that this is a problem, that is why I opened the issue to report it and listen what you say.
from fulcro.
In other words:
(render! app {:force-root? true})
- recalculates shared props always(schedule-render! app {:force-root? true})
- most times recalculates shared props, sometimes not
from fulcro.
Thanks for the clarification. Your final message was much more consumer-friendly. Succinct and to the point is best.
I agree with your assessment. Schedule render will not accumulate options which will cause a forced-root to be missed. That said, a force root render really should only be used in two cases I can think of: ops like i18n change locale where props have not changed but re-render is necessary, and dev-time.
the i18n code should therefore do a manual render and not a scheduled one.
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
- Fulcro 3.6 use of React Context breaks shouldComponentUpdate optimizations HOT 9
- http-remote :status-code is always 500 on error HOT 6
- Potentially add "Accept: application/transit+json" header. HOT 1
- 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.