Comments (4)
Sorry for the delay getting back to you.
Because all view has to be updated, I would need to update all the models
Yes or at least they will eventually need to be before they come on screen.
We currently don't have infrastructure to handle rotation in other ways that updating all the models.
But if you want to tackle it, here are a few different approaches that you could pursue :
- Instead of regenerating the whole component tree, just do a relayout.
- For your components always compute a landscape and portrait version and switch between them.
- Recompute only a subset of what is visible synchronously, and start the recomputation of others asynchronously. In your datasource when you're about to show a new cell verify the right layout has been recomputed and otherwise enqueue a synchronous recompute/just wait until the async recomputation is done.
This could be a great addition to the datasources ! Let me know if you need more info.
from componentkit.
Thanks for the response!
I'll try the approaches you mentioned and let you know.
from componentkit.
@7ynk3r Hey, I am facing a similar issue as you have, and was wondering if any of the above suggestions helped you? I am quite new to ComponentKit. I am not sure how to do a relayout as suggested above. @benlodotcom If you could also guide me how to do that, I would appreciate it.
from componentkit.
I end up doing reloading the list after rotation it. The problem is that if the list is long it can take a little time.
from componentkit.
Related Issues (20)
- Component not release
- [Documentation] Views path is not render HOT 3
- Delete 'Carthage/Checkouts' directory
- question - docs (docusaurus) repo? HOT 2
- Xcode not building ComponentKit checked out via cocoapods HOT 2
- Docusaurus source code
- question: My component is not getting full width in screen landscape mode. HOT 1
- Not Support Incremental mount
- Build Error with "RenderCoreLayoutCaching" HOT 1
- ComponentKit does not compile with Xcode 12.5 HOT 1
- Compile Error: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior HOT 1
- How do I pass multiple arguments
- Unsupported Swift Version: “FBSnapshotTestCase iOS” contains source code developed with Swift 3.x.
- [Question]How to unmount components from HostingView?
- How to make children component height equal to Scroll component's content view height but Scroll component's height HOT 2
- Yoga-internal.h:135:11: error: definition of implicit copy constructor for 'Values<9>' is deprecated
- CKNonNull.h:47:33 No member named 'move' in namespace 'std'; did you mean 'modf'?
- Abandoned?
- ComponentKit/ComponentKit.xcconfig is compiled as source code
- Unable to compile example project
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 componentkit.