-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration options to App
to choose reconciler
#495
Conversation
I'd prefer this interface: static let _configuration: _AppConfiguration = .init(
useReconciler: .fiber,
shouldLayout: true
) |
I updated it to this: static let _configuration: _AppConfiguration = .init(
reconciler: .fiber(shouldLayout: true)
) Reconciler options are: .stack
.fiber()
.fiber(shouldLayout: true) You can also pass the root environment in the configuration. Let me know what you think. |
useFiberReconciler
configuration to App
App
to choose reconciler
|
Sources/TokamakDOM/App/App.swift
Outdated
case .stack: | ||
_launch(app, configuration.rootEnvironment, TokamakDOM.body) | ||
case let .fiber(useDynamicLayout): | ||
// _ = Unmanaged.passRetained( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if PR is ready for review, but if so, this commented code needs to be cleaned up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all the nits! 😅 This looks great 👍
This PR enables support for
App
+Scene
in the Fiber reconciler, and provides a way for apps to specify whether they want to use theFiberReconciler
, and if they want to enable custom layout.