Comments (9)
Decompose is primarily designed for declarative UI frameworks, like Compose, SwiftUI, React, etc. Also it is not possible to publish such an iOS framework (see the following thread for more information on this). All I can do here is to try to create a sample iOS app. However it might be difficult for me, as I'm not an iOS developer. Would it help you? I might need some help from community in this case.
from decompose.
That'd be ok for now.
from decompose.
I am confirming. I also need UIKit
support in my nice project using this great library. I am an experienced iOS developer and can help you but my kotlin XP is not so rich. How can I help you?
from decompose.
@arkivanov I though Decompose didn't rely on MVIKotlin, why is it important? Sample iOS app would be very much appreciated! It'd help me a lot. I could help as far as I can myself.
from decompose.
SwiftUI can work with UIKit very well. Example so I am sure that it is very easy to add UIKit projects support and it also will make this beautiful lib even more popular cause a lot of legacy projects will be able to migrate to it
from decompose.
@moffpage Decompose does not depend on MVIKotlin in any way, and I didn't mention MVIKotlin either. Why such a question?
from decompose.
@fnc12 I will appreciate your help here! There is Counter sample in this repository. For Android it has two separate UIs: one using Jetpack Compose, and another one using normal Android Views. They both integrated in the MainActivity, depending on a flag. For iOS there is only SwiftUI. So I think we can do similarly to Android here and add UIKit, either in the same app with a flag (if possible), or as a separate app/target.
The Counter sample demonstrates nested Routers
, and also multiple Routers
in a component. But it would be also good to demonstrate UI state preservation while navigating between components. E.g. scrolling position should be restored when navigating to a previous component. There is currently no UI state which requires restoration in the Counter sample. So ideally we should add something for this, maybe some scrollable list, etc. I will update the Counter sample soon, so there will be UI state restoration as well.
UI state preservation is very important. It is supported by extensions-compose-xxx
and extensions-android
modules. And ideally it should work the same way in iOS. So let me first update the Counter sample, and then we can add UIKit. Does it sound good?
from decompose.
@arkivanov Sorry, I didn't mean anything related to MVIKotlin, just wanted to clarify if Decompose somehow depends on Reaktive? If not, what's the issue? Do we have to to have adapters for RxSwift? Since Value<*> has subscribe
and unsubscribe
methods, couldn't we just subscribe and unsubscribe in UIViewController's (or UIView(?)'s) appropriate lifecycle methods? And I believe we could still use Combine with UIKit, which Decompose has compatibility with through extensions.
from decompose.
@moffpage I provided the link to the similar discussion we had in Reaktive. It explains why it is not really possible to create and publish a separate iOS Framework with Swift extensions and helpers. E.g. for Android we have extensions-xxx
modules published, which can be used by consumers to bind UI with Decompose components. But for iOS we can't publish anything like this, as explained in the linked issue. So the only way at the moment is to copy-paste solutions from samples, etc.
from decompose.
Related Issues (20)
- Add Compose previews to all samples
- Describe routing options in the docs HOT 3
- Add `Navigator.navigateSingleTop` extension function HOT 3
- Setup publication checks
- Calling `backPressedDispatcher.onBackPressed()` from a child component does not trigger back action
- [extensions-compose] Сonsequences of rememberSaveable HOT 20
- Back button handling shouldn't be part of the main API HOT 2
- Consider renaming Configuration to Key HOT 1
- Dead links in the readme HOT 1
- Support new Apple silicon targets
- Dynamic list of active child components HOT 1
- Navigator.bringToFront() not available in 0.3.1 HOT 4
- Enable watchos target for the Counter sample after Kotlin 1.5.31 update HOT 2
- Add simplest code examples to the main Overview docs section
- Nullable Value/MutableValue HOT 3
- Broken link in docs HOT 2
- Failure to render screen after installation HOT 5
- Web Browser routing support HOT 2
- is this support multi window in desktop? HOT 1
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 decompose.