CLOVIS
01/08/2022, 4:49 PMfun RBuilder.foo()
) are apparently not supported anymore (they still emit UI, but in the closest proper React component, not in the scope of the element they're called in). I'm currently migrating all of them to be proper components, which work fine.
As an added bonus for the devs, thanks a lot for this new syntax, it really is much more convenient and readable than the previous one.turansky
01/08/2022, 7:04 PMOne thing to keep in mind is that apparently creating regular functions that emit UI (previouslyIt rare cases I also use) are apparently not supported anymorefun RBuilder.foo()
ChildrenBuilder
extensions (in drafts) - no problems detected.
Please report an issue with example from parallel thread
cc @Sergei Grishchenko , @aerialistturansky
01/08/2022, 7:11 PMChildrenBuilder
as hooks receiver - not recommended (static analizer - single really fine solution in this case)
• Short component creation:
// Before (redundant empty lambda)
br {}
div {}
span {}
// After (with same result)
br()
div()
span()
CLOVIS
01/09/2022, 10:03 AM@context
and not a receiver, but that's not available yetCLOVIS
01/09/2022, 10:04 AMturansky
01/09/2022, 5:59 PMWhy is ChildrenBuilder not recommended for hooks?Because it’s 25% safety only, which also: • increase bundle size • reduce readability Only static analyzer can solve this problem effectively
turansky
01/09/2022, 6:01 PMIt should probably be anReceiver - wrong direction Potentially we can have solution without receiver at alland not a receiver@context
aerialist
01/09/2022, 7:33 PMOne thing to keep in mind is that apparently creating regular functions that emit UI (previouslyhttps://kotlinlang.slack.com/archives/C5ZTZ6ER0/p1641756608001100?thread_ts=1641460995.002000&cid=C5ZTZ6ER0) are apparently not supported anymorefun RBuilder.foo()