Is it possible to set `props` that were prepared b...
# javascript
h
Is it possible to set
props
that were prepared beforehand for a
FC
directly? As an example
Copy code
dialogSettings?.let { dialogSettings ->
    ProductionPlanDialog {
        open = dialogSettings.open
        title = dialogSettings.title
        description = dialogSettings.description
        cancelText = dialogSettings.cancelText
        submitText = dialogSettings.submitText
        onCancel = dialogSettings.onCancel
        onClose = dialogSettings.onClose
        onSubmit = dialogSettings.onSubmit
    }
}
to just something like
Copy code
dialogSettings?.let { dialogSettings ->
    ProductionPlanDialog.createWith(dialogSettings)
}
t
Sure:
Copy code
dialogSettings?.let { dialogSettings ->
    +ProductionPlanDialog.create(dialogSettings)
}
You almost guessed the name of factory function ๐Ÿ˜œ
h
Oh, I actually tried that.
t
Copy code
dialogSettings?.let { dialogSettings ->
    +createElement(ProductionPlanDialog, dialogSettings)
}
h
Works, thank you very much for your super quick response.
t
And initial probably can work in 2.1 - check required
h
Nice, aside from some small hook pitfalls it's really nice to use React in Kotlin with the wrappers. Thank you and the others for your work on them.
Is there a rough time window for them coming out of "pre" status? Something like latter half of 2025 is the rough aim or so?
t
Now "pre" means - we will change API if it can be better.
h
"pre" being like "Probably Regularly Enhanced" ๐Ÿ˜„
๐Ÿ˜€ 2
t
We have no good versioning alternatives for now. We want to include library version and common version. And for now
YYYYMMDDHHMM
(draft common part) looks very long ๐Ÿ˜ž
h
Understandable.
t
We have 160 versions to think ๐Ÿ˜‰
๐Ÿคฏ 1
I mean
pre.999
-
pre.839
= 160 versions ๐Ÿ˜‰
pre.1000
we can't use ๐Ÿ˜œ